Unit Tracking

by johnnewman

Unity - Sample project to learn basics of unit spawning and game loop updates

( Updated an hour ago )


This was a sample project to learn the basics of unit spawning, game loop updates, and collisions. As you hold the mouse button down, units continuously spawn until you let go. Right clicking switches the camera between orthographic and perspective modes.

The large rectangles and spheres have random trajectories, but will switch direction when they hit the bounding box of the orthographic camera. The large rectangles act as missle turrets as they fire missles (the smaller rectangles with flame particles) at the spheres (targets). The missles continuously approach the spheres until they hit, causing the missle to despawn and the turret to shoot another.

This GIF shows switching between orthographic and perspective cameras, as well as flipping to the scene view to check out the action from another angle and view the bounding box.

Alt text

It is also built to run on the iPhone/iPad.

Alt text