- Home /
How can I detect the angle of the platform the player is on?
Attempting to have my player slide down steep slopes ( >45º), and I know how to code into my character controller the sliding movement, but I can't figure out is how to detect when the player is actually standing on a slope… It's not a rotated platform, so I can't get the rotational value, it's just a basic mesh with a slope. Any of you guys know the answer?
Answer by Essential · Feb 24, 2012 at 08:07 AM
Okay I figured out that I need to grab the normal.
function OnControllerColliderHit(hit : ControllerColliderHit) {
Debug.Log("Normal vector we collided at: " + hit.normal);
}
http://unity3d.com/support/documentation/ScriptReference/ControllerColliderHit-normal.html
Your answer
Follow this Question
Related Questions
Slope angle fix 0 Answers
Checking slope angle the object is standing on? 1 Answer
Problem with getting constructional slope angle. 0 Answers
Unity, walking up small steps with rigidbodies 2 Answers
Collision normal angles. 1 Answer