Hi
I am creating a third person game where there are enemies continuously shooting at a direction problem is I have no idea where to start in terms of getting the enemies shooting?
Thanks
Hi
I am creating a third person game where there are enemies continuously shooting at a direction problem is I have no idea where to start in terms of getting the enemies shooting?
Thanks
Well, yes. That’s what you requested. I had assumed that by ‘a direction’ you meant something like an arrow trap that fires in the direction its facing.
If you wanted to target the player:
Or you can update the rotation of the entire actor to point at the player and then fire along the forward vector. Something like a turret.
Also, avoid using Tick for something like that. It’s not a great method. That’s unless you must smoothly rotate the actor / barrel of a gun, of course.
Still, firing should be separate from rotation. Timers work great for this.
I cant seem to get it to work. it is still just firing sideways and not moving?
You’d need to at least briefly describe how it’s supposed to work. Atm, we know nothing about what you’re doing.
ok. so basically ijust want the enemy to constantly in a specific direction like player has to dodge the bullets to get past. i have an animation already in for enemy movement its just getting the projectile to actually move i would like. if that makes sense
could a forward vector be of any use
i ahve copied your bp and now the enemy isnt shooting at all?
Would you share the way you did it? It could be many things, you might have forgotten to set Tracking Speed for example or you may have collision blocking something. It’s hard to guess what might have gone wrong…
Or, if you prefer, here’s the link to the above project:
https://drive.google.com/file/d/1_AeH5dniKSwXym0KnXhjOz6WcyGPGzcz/view?usp=sharing
I have managed to get it to shoot at the player think I had one of the world locations in the wrong pin. Thanks so much for your help!!
Wicked! Good luck with the rest.