- Home /
Question by
Ereptor · May 25, 2013 at 06:02 AM ·
colliderclimbladderoncollisionstay
Is this how a ladder collider works?
Hi everyone! I'm trying to make my ladder collider work, can someone help me?
I'm not getting errors, it's just not working. The following is part of my FirstPersonController.cs:
void OnCollisionStay(Collision collisionInfo){
if(collisionInfo.gameObject.tag == "ladder"){
if(Input.GetButton ("Climb")){
verticalVelocity = 5.0f;
}
}
}
The object is to enable the "Climb" button if the CharacterCollider encounters an object tagged "Ladder". As I mentioned, this is a part of the controller script attached to my player.
Thank you for reading!
Comment
Best Answer
Answer by FL · May 25, 2013 at 11:53 PM
http://unitygems.com/mistakes1/ , third topic. Put logs to make sure that your method is called.
Your answer
Follow this Question
Related Questions
2d Ladder with character controller 2 Answers
Internal collisions 1 Answer
Climbing Walls 0 Answers
climb a ladder. How to do? 9 Answers
How to make a ladder script for unitiy's FPS controller? 1 Answer