The 2D Homing Missiles asset for Unity gives you realistically moving missiles to use in your games and prototypes along with smoke trails.
Normally, missiles should never move directly towards their targets, this is not how they work in real life. Too many times we see simple missile follow scripts being used to allow missiles to track targets.
The 2D Homing Missiles asset does realistic missile movement using a proportional controller model.
The proportional controller algorithm is used to move missiles intelligently, instructing missiles to reach their target by correcting flight direction error, rather than just move directly to their targets. A desired state is constantly fed to each missile’s controller, as their targets move, steering the missiles in the right direction in order for them to reach their targets with realistic flight paths. This results in super realistic (and entertaining to watch) missile patterns.
The asset has controls to tweak the proportional constant factor, and speed of missiles, allowing you to tune their performance and flying patterns as you require.
Downloads and links
- Proportional constant (PID controller) homing missile script + supporting scripts
MissileLaunchScriptscript with custom inspector editor components for single / multiple missile launcher node configuration and pattern randomness configuration, as well as launch control options with tag targetting, closest target options, and auto-fire mode
ObjectPoolManagerscript to aid in the usage of optional object pooling for missiles
- Missile sprites and prefabs
- Smoke trails for missiles
- Demo scenes to demonstrate dynamic instantiation of new missiles, as well as some custom launch patterns / multiple missile launches. Includes some extra helper / demo scripts too
- Free explosion audio effect and basic explosion prefabs