Download

Homing projectile spiral motion, How to?

Hi,

I have a homing projectile (the default one in Unreal) setup with some custom BP, while everything is working I want to have the projectile to spiral as it moves towards the target.

Any advice on how to do this?

Thanks

Add relative offset to mesh’s Z, add rotating component to the projectile actor, rotate on X. Interpolate the relative offset down to 0.

https://i.gyazo.com/b81c1222f68d1e7fd0a6e774e4ee474c.mp4

Capture.PNG

Seems worth experimenting with as it’s quite simple. Not sure if there are any issue here, did not test it thoroughly. Can definitely be improved - Target VInterpTo could be based on the remaining distance to the target, for example.

Sounds like this could work! Thanks, I assume there is a way to find out the target distance without resorting to traces. Perhaps by a node that could figure out how close the target is to the projectile? This way we can have the diameter of the spiral narrow down to its original center position the closer it gets to the hit target and wider the further away it is from the target to give a nice effect.

Since the Projectile Movement holds a reference to the Homing Target Component, you can do this in the projectile actor to get the distance:

Capture.PNG

Should be close enough; if it’s not, use the mesh’s location instead for more precision.

In the example I posted it tightens automatically but some extra randomness would make the trajectory more interesting to watch, surely! And yes, I’d approach it precisely how you described it.

wonderful thanks again.