S
S
Sherck2017-05-14 17:19:44
Game development
Sherck, 2017-05-14 17:19:44

How to change the angle of the character (four-legged animal) in a 2d game?

There is a four-legged character in a 2d game, it is necessary that, in accordance with the unevenness of the surface (in ascents and descents), he changes the angle along the z axis. What is the best way to do this?
I move the character using rig2d.velocity= new Vector2(move*mazSpeed, rig2d.velocity.y).
upd: I know how to change the coal, you need something like joints so that it automatically changes the coal in accordance with the unevenness of the surface (in ascents and descents).

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Daniil Basmanov, 2017-05-14
@Sherck

Use Rigidbody2D.rotation .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question