Answer the question
In order to leave comments, you need to log in
Why does Unity need Vector3 when infinitely rotating an object with transform.Rotate?
The question is probably stupid, but.
To create an infinite rotation of an object in Unity, you need to write transform.Rotate (...) to the Update function, but in order to multiply by a given speed, and time. delta time, you need to add new Vector3 in brackets, why in the first case you can just write down the parameters, and in the second one you need to specify new Vector3 to multiply by a variable, and by time delta time?
public float speed = 10f;
void Update()
{
transform.Rotate(new Vector3(0,30,0) * speed * Time.deltaTime);
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question