Lock-on Targeting

I decided to build a Lock-on targeting system for Shifter so I can aim at enemies and bosses that are out of my 8-directional reach. I’m removing the test from Shifter, but a lot of people have asked about homing attacks and aiming, so I copied this to a new game as an example for anyone that wants to check it out. Not much to explain. It’s a simple targeting system. It automatically selects the nearest target and locks on, depending on how close it is, or how long you held Left or Right. You can skip targets by aiming farther. Press Left or Right to toggle targets, and Space to activate the target you selected. If you guys remember my directional key main menu system, it was cool, but this Lock-on targeting will allow me to make a MUCH more unique menu system, and it’s even easier to work with. Destroying all 6 targets resets the game. Aim and shoot them fast, or wait for auto-targeting to switch to the next one. http://flowlab.io/game/play/760378