It looks like you're new here. If you want to get involved, click one of these buttons!
Hi I want to add a homing missile to my 3d game which i am unable to do. I want that the missile follows the player, avoids the environment and also can be dodged like it can crash into the environment so that the player can save itself from the missile(much like the one Dani made!). I have tried "movetowards" and "look at" but the missile isn't dodgeable when we use it. Please help me!
Answers
You need some kind of smoothing for the LookAt stuff.
Try adding another vector3 variable called targetDir, and set it equal to Vector3.Lerp between it's current facing direction. and the direction it want's to face in, i.e. at the player, or away from the environment.