Forum Discussion

🚨 This forum is archived and read-only. To submit a forum post, please visit our new Developer Forum. 🚨
Anonymous's avatar
Anonymous
8 years ago

Preventing Player Climbing

Currently in my game when a player approaches an object that has a slope they will sort of jump onto the object and then begin moving up it. For example, my game allows players to pull on "levers" which are cube objects that I stretched to look like light switches. Even though these levers are suspended in the air, the player still ends up on top of them if they get too close. Is there an easy way to prevent the player from moving onto any objects other than the floor upon which the player stands? Essentially I want to be able to lock the players y-position so that they cannot move vertically at all. 

EDIT: I figured it out. Just had to change the slope limit for the character controller. 

1 Reply

Replies have been turned off for this discussion
  • Glad you got it figured out. Another way, that came to mind, depending on your character controller would be to lock the position of the Rigidbody (assuming it has one).