Quantcast
Channel: Questions in topic: "enemy"
Viewing all articles
Browse latest Browse all 1488

Instantiate Projectile towards player (regardless of transform.rotation)

$
0
0
I have an enemy in my game who (as you'd expect) shoots at me if I'm in range. I have a gun attached to the enemy model, and a script which instantiates a projectile at the end of it(using a bulletSpawn empty GameObject). The problem is, as part of the shooting animation the gun isn't facing directly at me. How can I instantiate the bullet in the direction of the player? Thanks

Viewing all articles
Browse latest Browse all 1488

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>