Skip to main content
March 19, 2018

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. 
This topic has been closed for replies.

1 reply

Inspiring
March 20, 2018
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).
AlanOToole.com Twitter: @Alan_OToole