Download

Homing missile with movable target

How can I create a homing missile with a pawn as target?
The Homing Missile function from UE4 allows only static mesh actor targets.

Has anyone made this yet?

No, but I do have an idea for a wire guided projectile that follows your crosshair. For homing I can tell you it will most likely involve a Line Trace to pull the targeted Actor hit and get the actors location. You would need something like Event Tick to continuously update the projectiles velocity vector,using a rotate vector to calculate where the projectile is and where the actor is and rotate the velocity accordingly

Really simple way then could be to have a static mesh on your pawn and cast to it and get the static mesh.

You should look up some tutorials in a more known area like for C++ or something in 2D, and then apply the same methods to UE4 in 3D.

Read up about BOIDS you want subset of that stuff for your homing missile.

I don’t think you would need to go that complex for it at all. Just move it towards it’s location at a set speed and give it some lag in direction change so that it follows more along the path the enemy is taking

You basically described boids steering. And those articles about boids explain it better.

I solved it as follows:

My rocket is an actor instead of a projectile. Then I moved this actor with the event tick and the set actor location function to my target location.

Sometimes it’s easier than you thought :slight_smile:

Yep easy solution usually does the trick. Definitely if you want something very realistic than looking into boids is a good way to go and tweaking cohesion etc etc but as an initial way then what you have done does the trick very easily.