It doesn’t look much like a rocket since you’re not rotating the projectile as well.
What I would do is to get the look at rotation as you did and change the rocket’s world rotation by lerping between its current world rotation and the look at rotation you find. It’s a minor difference but it’s how they do it in real life, so it will probably work.
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!
Thanks for the response and suggestion!
The results appear to be the same as what I had. It does make it look a little better, and the missiles do get closer, but it still misses.
I’ve attached the suggestion you said, and added a current temporary solution. This solution still misses initially, but at least it makes the missile hit the target for sure when it loops back.
I still am not sure of a true solution.
Under Homing in ProjectileMovement, make your “HomingAccelerationMagnitude” about 10 times larger than your projectile speed. So if your initial projectile speed is about 1,500, make you HomingAccelerationMagnitude 15,000. It worked for me. Good luck!
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