With a basic level, it was time to work on shooting. First things first, I had to get rid of the soldier model I downloaded. Instead, I transitioned to a simple, blue cylinder, my player object. I then created a few red cylinders to represent my enemy objects.
Next, it was time to actually shoot. I started with a laser, mostly because instead of having to deal with an object moving from point A to point B, I really just have to draw a line. Later I'll work on getting animated bullets and missiles to be fired. Creating the laser, with a line renderer, was refreshingly easy to setup.
With a laser, a source and a target, I was ready to shoot! I created a little function that scanned the level looking for objects of a certain tag type ("Enemy"), and used that to dynamically create shoot buttons, to target each enemy.
Next, it was time to actually shoot. I started with a laser, mostly because instead of having to deal with an object moving from point A to point B, I really just have to draw a line. Later I'll work on getting animated bullets and missiles to be fired. Creating the laser, with a line renderer, was refreshingly easy to setup.
With a laser, a source and a target, I was ready to shoot! I created a little function that scanned the level looking for objects of a certain tag type ("Enemy"), and used that to dynamically create shoot buttons, to target each enemy.
No comments:
Post a Comment