I have a number of object with different rotation position and at a given time I want all objects to restore rotation to 0. I want that “return-rotation” to be animated meaning it should not happen instantly.
I am currently testing on a single object, tag = SK, but do not understand how to achieve this so it looks smooth.
I am currently testing on this code, not placed in Update():
float speed2 = 5;
float zRotation = 90.0f; // Just a test number to try to understand
dummyGameObject = GameObject.FindWithTag("SK");
dummyGameObject.transform.eulerAngles = new Vector3(dummyGameObject.transform.eulerAngles.x, dummyGameObject.transform.eulerAngles.y, zRotation * speed2 * Time.deltaTime);
I would appreciate any help on this topic as i do not really understand this fully.