- Home /
Question by
richardzzzarnold · Feb 21, 2020 at 12:02 PM ·
missile
Getting a missile to bank as it turns
I have a script for a plane or missile to follow a target. But I am uncertain how to get it to bank properly as it turns. Any idea how I can achieve this?
Vector3 direction = Target.position - transform.position + Random.insideUnitSphere * randomOffset + new Vector3(0, height, 0);
direction.Normalize();
transform.rotation = Quaternion.RotateTowards(transform.rotation, Quaternion.LookRotation(direction), missileTurnSpeed * Time.deltaTime);
transform.Translate(Vector3.forward * missileSpeed * Time.deltaTime);
Comment
Your answer
Follow this Question
Related Questions
Missile Collision and Explosions 1 Answer
Alternative for worldVelocity in Shuriken Particle System? 3 Answers
Rockets Shooting up, negative number doesnt solve it 1 Answer
Help On Multi Missile Launcher 1 Answer
Missile Firing Script Help 1 Answer