Hi Guys I’m making a top down 2d shooter where I have this homing missiles and I want them to have more realistic paths, right know they look good but I’m not happy with them.
if (!_onCD && _target != null) {
Vector2 diff = _target.position - transform.position;
diff.Normalize ();
float rotZ = Mathf.Atan2 (diff.y, diff.x) * Mathf.Rad2Deg;
transform.rotation = Quaternion.Euler (0, 0, rotZ - 90);
rigidbody2D.AddForce (diff * speed);
}
and the rigidbody2D has an angular drag of 1.5.
Demonstration:
I would like it to initialy rotate smoother not like he is doing it, I need it with more orbital stuff XD.