Download

Attack that warps to nearest enemy but shoots forward if none are nearby?

How would you approach this?

You could have a homing projectile (turn on homing in projectile component) and a non homing one, if there’s an enemy within range spawn a homing one, if not, a forward one. Or just turn homing on/off on the projectile.

Could do the distance checks in a number of ways. Like a detection sphere and check for overlapping enemies.

The built-in homing system is just not good enough.
There’s a bunch of answer hub threads about this.
(Use Startpage.com then search on homing missile).

Unfortunately most replies are flawed too in some way.
Missiles are set off early if targets hide behind meshes.
But the big flaw overall seems to be ‘circling the target’.

So doing a distance check here will help save the day…

The homing system when it works isn’t good enough.
There’s a bunch of answer hub threads about this.

Unfortunately most replies are flawed too in some way.
Missiles are set off early if targets hide behind meshes.
But the big flaw overall seems to be ‘circling the target’.

A distance check when close to target can help fix that…

Try this: https://www.youtube.com/watch?v=uVbwhm5gHXo