- Home /
Question by
mike29willems · Mar 26, 2019 at 11:36 AM ·
rotationrigidbodyslopequaternion.lookrotation
How to rotate the Rigidbody based on the normal of the ground??
How to rotate the rigidbody based on the normal of the ground with arrayCast hit.normal and function quaternion.lookrotation. If u read this now I will copy my script shortly.
Comment
Answer by laurG · Mar 26, 2019 at 12:15 PM
You don't need LookRotation().
Quaternion.AngleAxis(angle, normal);
Should do the trick.
How do I create an angle of the joystick input (that gives me a vector between -1 and 1)? @laurG
Your answer
Follow this Question
Related Questions
How to make a player rotate in a direction with a slope of the ground. 0 Answers
Rotate Rigidbody to always face a force 0 Answers
Why does rigidbody rotate randomly on its own? 1 Answer
Character won't rotate right in faux gravity enviroment. 1 Answer
Best way to rotate a physics-object based on input 2 Answers