How to Make homing projectile chase the closest player instead of follow just 1
Here’s how to achieve your objective from scratch
First, create a new actor class BP for our projectile. Then navigate to the Components window on the top left, hit that Add button with a plus (+) icon on it, and add the Projectile Movement component like this:
Select the Projectile Movement component, and while having it selected, navigate to the Details window on the right side and type in “homing” into the search bar. Under the Homing section, enable the Is Homing Projectile
property and assign a Homing Acceleration Magnitude
like this:
You can also adjust the other settings there as well, such as the Initial Speed
and Max Speed
:
Then implement this blueprint code into the Event Graph:
And here’s the result:
Hope this helps!
1 Like