- Home /
Question by
laurienash · Aug 30, 2013 at 11:03 AM ·
charactercontroller
Can you set a slope limit without a character controller?
Hello!
One of my third person controllers has a rigidbody and capsule collider attached instead of a character controller. I was wondering whether it's possible to set a slope limit in any way without adding the character controller, or if I'll have to resort to using box colliders to stop the player from walking up steep slopes?
Thanks, (sorry for the newbie question) Laurien.
Comment
I don't know how old this question is, but i also need this answer. so consider this a bump
You just have to code it yourself. There's no built-in way to do this. For starters, try taking the dot-product of the surface normal and Vector3.up. This will give you a number between 0 and 1 that can be used to detect the slope of the current surface.