Hello everyone,
I am making a simple 2D platformer and want to implement ladders to allow my character to reach places that are too high to jump to. But it seems impossible to make my character move anywhere along the z-axis unless it’s jumping. I’ve made sure the character is not constrained to a plane.
I’m trying to use a SetActorLocation node to make the character’s z-location change by 5.0 when the player holds down the climb button. But nothing happens when the button is pressed. To test it, I tried adding 2.0 to the x-axis, and that worked, but the character still wouldn’t move up. I also tried setting the gravity to 0, but that didn’t work either (character floated, but still wouldn’t move up).
So far, the only possibility I’ve managed to find is to switch the character’s movement mode to flying. That makes it possible to move up, but then switching back to regular movement becomes an issue. Because my climb functionality is coming of the up input axis event, I could switch it to either flying or walking based on whether or not the character is next to a ladder. But when the character goes back to walking, they are stuck forever walking, so they can no longer jump or fall.
I’ve attached a screenshot to show you what I mean. How can I make my character move up and down? Any help would be greatly appreciated.