- Home /
Slope Limitation
Hello, I was wondering how I would go about changing slope limits, I don't have a character controller but I was wondering if I could program it to where I can't go up certain angled mountains.
Thanks in advance!
Answer by gardian06 · Jul 11, 2013 at 05:55 PM
this is realistically already accomplished through the physics system by having a rigidBody and having it be effected by gravity.
technically you can improve this by limiting the rotational euler angles of your character other then that of gravity (so x and z) then right the character when they break the angle limits, and have gravity take over. you may even realize that just by the virtue of having a rigidbody attached to the object that they will slide down hills. this is also where you would want to flip the character back over when they go on their side, or upside down.
the way to insure this though is by manipulating the steepness of the terrain so that gravity wins.
Answer by sparkzbarca · Mar 21, 2013 at 10:09 PM
charactercontroller.slopelimit = angle in degrees
this value is displayed publicly in your inspector in the expanded character controller view.
mark as answered
It's not answered i said without a character controller Thanks though.
Your answer
Follow this Question
Related Questions
How To Add A Limit To Amount Of Objects 1 Answer
Cloud recognition in Vuforia 0 Answers
Unity 3D connection to (MS)SQL server 3 Answers