Problem with climbing the ladder

Hi. I have function Jump. In this function existents code for the jump and climbing the ladder. But when I press Jump button jump is triggered but not caused сlimbing the ladder? How to solve this?? Please help. Urgently need

Sorry,

I didn’t understand what you want it to do, do you want it to check if it is close enough to the ladder in order to climb it or jump?

Jumping and Climbing the ladder working on a single button. I’m checking on or I’m on the ladder or I can climb a ladder. But when th player near ladder, I press jump button - the player do not climbing the ladder. I can`t solve this. If necessary I can provide the code

a screenshot of the code could surely help

1 Like

it is hard to say, does the Debug.Log (climbVelocity) gets printed to the console when you try to climb? if not, you should check if the if (canladder & Input.GetAxis) is working with another Debug.Log

I noticed that onLadder is always false. But I tested moving from keyboard, everything is working.

1 Like

I’m glad that you sorted it out! :clap:

Not exactly. First I tested the game on the keyboard - all worked, but when I add joystick button I have a problem. Right and left button are working, But when th player near ladder, I press jump button - the player do not climbing the ladder. Exactly this problem I can`t fix(

Probably the problem is within the joystick itself, give a read at this Link

Privacy & Terms