Character falling backwards climbing terrain
Hi,
Im following a couple of tutorials, im new to Unity, really appreciate help!
I've got my character ascending a hill, rotating and moving as i want, but when i climb the hill the character starts to fall backwards and this does not correct when i return to a flat hill angle (it does semi correct when its completely flat after a while)
Im using rigidbody and capsule collider and this is my code where i set my rotation and position while moving:
transform.rotation = Quaternion.Slerp(transform.rotation, playerRot, rotSpeed * Time.deltaTime);
transform.position = Vector3.MoveTowards(transform.position, targetPosition, speed * Time.deltaTime);
I have my freeze rotation on x,y and z set.
Your answer
Follow this Question
Related Questions
Custom Rigidbody Controller and Moving Platforms 0 Answers
Rotate Rigidbody using eulerAngles.y of Camera 1 Answer
How can I calculate RPM to rotate a monowheel based on Rigidbody velocity? 0 Answers
My player spins when I enter play mode. What am I missing? 0 Answers
After added a rigidbody in a GameObject, it moves on rotation 2 Answers