V
V
Vrtop2019-08-19 10:59:59
Unity
Vrtop, 2019-08-19 10:59:59

I can't make the unit rotate the map 180 degrees when crossing a trigger?

I don’t know how to write scripts and therefore turned here, how can I rotate my map 180 degrees when crossing a trigger.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
alekseyHunter, 2019-08-19
@Vrtop

It is not clear which card, write in more detail.
This will rotate 180 degrees around the x-axis.

float degrees = 180;
Vector3 to = new Vector3(degrees, 0, 0);
transform.eulerAngles = Vector3.Lerp(transform.rotation.eulerAngles, to, Time.deltaTime);

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question