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
Check how the projectile in the 1st person template is made. Make one like that in your project.
game where there are enemies
continuously shooting at a direction
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.
Hi, ok so i have managed to get the projectiles shooting out, but the problem is that they are just shooting sideways opposed to in the general direction of the player!
I cant seem to get it to work. it is still just firing sideways and not moving?
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
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.
could a forward vector be of any use
Here’s an example of a turret that rotates towards the player and fires only when the player is in sight:
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
You’d need to at least briefly describe how it’s supposed to work. Atm, we know nothing about what you’re doing.
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.