How to make flying spaceship enemy

Hello everyone! I am trying to make a simple game where you fly around a 3D space and shoot at enemy spaceships. I’m not trying to do anything complicated with the A.I yet, all I want is for an enemy pawn to keep moving to different points around the 3D worldspace as if it was patrolling. I am having issues doing this because flying AI can’t use navmeshes, so how can I go about this? Should I just have an event that just gets a random point and interps the actor towards it off the event tick? Thank you

2 Likes

Probably the easiest is to add a projectile movement component and cut the gravity off. Then when they spawn they travel in a direction governed by that component.

I hate navmesh.

2 Likes

Would that work though if I want to add rotation as well?

1 Like

Projectiles can auto orient to velocity so you wouldn’t need to do much in regards to that. They also support homing so you can give a projectile a randomly generated target location to arrive to, if it gets close enough, generate another one.


A lot of stuff in games is more about what you can get away with rather than striving with realism.

2 Likes


I have something like this that kind of works but the movement is irratic and fast, I’m not sure how to have it move slower. I tried messing with the interp speed but it only seems to go faster. This is attached to my enemy BP

That’s not what was discussed above. If you want to approach it with a manual interpolation method, though, perhaps an introductory tut would help first; the vInterp node is not set up correctly here. You’d generally run it off Tick and feed it delta time it spits out. You want as frequent step updates as possible.

1 Like

you could always play around with add impulse but this is certainly not the best way to do it

Vinterp to propulsion method in the ShipScroller general movement theory thread SHIPSCROLLER (Side) - General Movement Theory