Answer the question
In order to leave comments, you need to log in
How to launch a rocket in a spiral and with a course deviation?
Friends, I'm trying to create a rocket launch that would fly a little in a spiral, for example, as in GTA 4-5, + to this, something would deviate a little from the course.
How to do something to deviate from the course found an example:
timeout+= Time.deltaTime;
if(timeout>2f)
{
scatter = Random.Range(-Scatter,Scatter);
timeout = 0;
}
transform.Translate(Vector3.forward * Time.deltaTime*Speed);
transform.RotateAround(transform.position, transform.TransformDirection(Vector3.right), scatter*Time.deltaTime);
transform.RotateAround(transform.position, transform.TransformDirection(Vector3.up), scatter*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