Y
Y
yraiv2020-06-29 08:14:08
Unity
yraiv, 2020-06-29 08:14:08

How to smoothly rotate an object to certain values? in 2d?

Need smooth z rotation in a 2d game with +-15 degree borders.

public float minimumUp;
public float maximumDown;

private float aircraftRotaion = 0;
void update()
    {
     aircraftRotaion =Mathf.Clamp(aircraft,minimumUp,maximumDown);
    }

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
Earthroy Erth, 2020-06-29
@yraiv

I'm certainly not a professional, but I use multiplications by Time.deltaTime

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question