- Home /
Question by
justinkatic · Sep 10, 2017 at 05:37 AM ·
enemybullettrackinghoming
homing bullets
so have my enemy looking at player and shooting my prefab bullet but in my game I want my bullet to be an orb that follows the player till it hits them but I cant seem to find a code that works which makes the bullet track the player object and homing onto them. any help would be amazing thanks.
Comment
Best Answer
Answer by Cuttlas-U · Sep 10, 2017 at 06:47 AM
hi; u said u created a script for enemy to look at player ; the homing bullut is almost like that ; the bullut should look at the player and then just need one lane code to move forward like this :
transform.Translate(Vectro3.Forward * MoveSpeed * Time.deltaTime);
so when bullut is facing player and moving forward is acting like a huming missile;
Your answer
Follow this Question
Related Questions
Homing projectile 0 Answers
Super simple Enemy follow player.. 1 Answer
Enemy health and bullet problem 2 Answers