- Home /
Question by
Orr10c · Sep 14, 2016 at 12:29 PM ·
playershootingenemiesprojectiles
how to make enemies shoot projectiles towards the players corrent position?(2d game)
i have a problem making a script attached to enemies that will instantiate projectiles that will shoot towards the player's corrent position on a certain range and without changing the enemie's rotation (note it's all on a 2d game). thanks in advance for all of your help!
Comment
After create the projectile get it transform and use transform.LookAt(player.transform) after that add the force using "projectile.transform.foward * force"