Forum rules - please read before posting.

Ladder - Move along path

I'm trying to create a ladder system, i'm using the AC_FirstPersonPlayer prefab.
So i have the ladder, i'm doing a Create Empty, place it to start of the ladder, assigning a Paths script to it, creating a second node, move it up to the end of the ladder.
After that i'm creating a Hotspot, choose Character: Move along path, assign a path to follow, press play, click on the hotspot where the ladder is and the player is stuck, he doesn't go up or down, he's standing there.

Comments

  • Is the intent to allow the Player to move freely up and down it?

    The issue is that movement input is still aligned to the ground - so even when looking upwards, the movement is still flat.

    I'll have a think about this. A custom script could handle this, after setting the Player's "Motion control" to "Manual", but I'll see how feasible it can be to have AC assist with such a mechanic.

  • Yes, when i press W i want the player to move up and when i press S i want the player to go down.

  • You would need to constrain the Player to the Path, using the Player: Lock to Path Action, and ensure that the Path has Override gravity? checked.

    There is an issue with the First Person player prefab that prevents this option from working, however. You can fix it by finding the following in AC's Char.cs script (around line 1362):

    else
    {
        simulatedVerticalSpeed -= simulatedMass * Time.deltaTime;
    

    And copy/pasting above it:

    else if (activePath && activePath.affectY)
    {
        simulatedVerticalSpeed = 0f;
    }
    
  • I have run some tests and found that your intended movement behaviour won't work currently. You will be able to move up the ladder, but not down.

    However, I should be able to make necessary changes for this as part of the next update. The workflow of locking the Player to a path will be the same.

  • Ok, thank you, i'll wait for the update.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.