Download

Getting projectile to fire at player now working..

so i’v been trying to get my enemy to fire a projectile at the players current location, however atm all iv been able to do it make my enemy shoot where its facing. This would normally be fine, however it doesnt take into account the players z axis so the player can avoid the monsters projectiles by being slightly above or below the monster.

This is my current code on attempting to direct the projectile at the player but its failing at the casting. anyone know how to fix this or know a proper way of making a projectile launch at the players current position?

Any help would be great! Thanks in advance -Unholypimpin

Hello,
Your input of “cast to mycharacter” is not set. Then it returns 0,0,0. By connecting a “get player character” you would have your location.

Aw yes that worked thankyou, however I guess aiming at the players location wasnt as easy as I thought. The code above seems to take his Z height into consideration but not his x or y axis. How would I fix up this code to make the projectile aim exactly where the player is currently standing?

The z is considered but origin of Blueprint is on ground. So you have to add a z to have it ok.