Answer the question
In order to leave comments, you need to log in
How to move an object forward despite Rotation?
Hello! I want to make the object spin, but also move forward.
Wrote this code
void Update()
{
transform.Rotate(0 , 0 , -Speed * Time.deltaTime); //вращение объекта
transform.Translate(Speed * Time.deltaTime, Speed * Time.deltaTime, 0); // движение вперед
}
Answer the question
In order to leave comments, you need to log in
Read about Space.World
https://docs.unity3d.com/ScriptReference/Transform...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question