How do I make accurate homing projectiles in blueprint?
I know there is the homing thing in the Projectile Movement component, but without using that, through Blueprint, how do I make accurate homing rockets?
The code I have right now -kinda- works. (is attached) It moves my actor toward the target, but it rarely hits on point. I have some initial impulse velocity in the construction script for when my missile spawns.
What I'm doing at the moment, is when I shoot, it creates a trace and whatever the trace hits will become the target location where I want my missiles to go. This code does that, but not entirely accurately. Most missiles miss and swirl around the object until it hits.
If someone could give me some pointers I'd greatly appreciate it! Thanks!
Sorry to necrothread, but this one creeps in so easily and is a simple fix.
Double check the Projectile Movement Component, the X, Y, Z vectors. The X is usually set to 1000 by default, and this gets incorrectly added to the homing calculations, so objects tend to circle forever or this force may be jerkily overcome with sufficient maginitude (not sure, but likely).
I hope you solved this, it might be worth zeroing out the vectors on the component automatically if homing is switched on
The deeper I get into projectiles, for unusual purposes, the more I'm liking them. I'm gradually figuring out ways to make them smoother and more blended in velocity and rotation :)
answered Sep 15 '16 at 09:30 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here