arrow_back How do you turn a character when he goes up a hill?

1 vote

Hi all. Here's a picture. I have a problem that I need to turn the character when he goes up (photo below) and I do not know how to do it. Can you help me?


And how exactly do you turn? As far as I understand, it should be rotated in the same way as the normal to the inclined surface?
Twist and turn the character and see how it turns.

1 Answer

0 votes
I would take the old position and the new position, and the vector of their difference would indicate the direction where to turn.

You can also do physics - arrange colliders, gravity and friction in such a way that the character will be pressed against the vertex by shape.

1 comment

Thank you. I'll try to implement it today)