I have been trying out different ways to achieve a homing projectile that I can use to simulate gameplay when creating effects. I have had 0 success. Ive tried Move to actor / location in blueprints, but I don’t know how to use Ai Controllers. I have tried splines but I can’t seem to get the end points to lock onto the actor. That’s what came to mind when I was working on it. I have seen some point attraction force use but I don’t know how viable that is in a development environment.
Keep in mind this is just for demonstration.
The idea is you’ll lerp between your current projectile position until you reach the target.
Change the interp speed to modify the projectile’s speed. Don’t forget to toggle the sweep checkbox on the set actor location function.
If your target is moving you’ll obviously need to check on tick the new position and update the target position.
I only have a sphere collision as the root component and my niagara system in there.
I have been unable to trigger the event on hit though, It doesn’t destroy the actor. I want to destroy the missile when it hits so I can play an animation at the target when it does occur.
Hello!
Hit even needs to be from your collision component not from your “receiver” or target. That will probably be enough to fix it.
I recommend reading a bit about collisions in unreal: Collision Overview | Unreal Engine 4.27 Documentation