I’m working on a side-scrolling platformer for a class, and I’m having difficulties getting the climbing mechanic nailed down. I’m absolutely sure I’m going about this probably one of the most resource intensive ways, but here is my current setup.
So every frame it checks if I’m in front of a ladder (I forgot to add the image, but it’s a simple ladder blue print that sets the boolean atLadder to true if in the volume, and false when not).
- If I’m not, the gravity remains the set 3.0, and onLadder remains false.
- If true, it checks that I am facing the ladder.
- If true, boolean onLadder is set to true, then the z velocity is modified, +500 when I press ‘W’, -500 when I press ‘S’, and 0 when nothing is pressed.
The included jump setup has been modified to jump off and up, facing the other direction if on the ladder.
- If true, boolean onLadder is set to true, then the z velocity is modified, +500 when I press ‘W’, -500 when I press ‘S’, and 0 when nothing is pressed.
The animation blueprint sets onLadder_AnimBP to true if onLadder is true. The included AnimGraph for Default shows how I set the animation state changes.
MY PROBLEMS
- When I approach the ladder and enter the volume, the character immediately enters the climbing animation state, however I am unable to move the character up or down.
- When I jump onto the ladder, my character stays in the falling animation, however the gravity is at 0 and I can move up and down, as well as jump off of it.
onLadder is firing as true, however these issues are persisting. Does anyone have any ideas?
-Derek