Advanced Coding and Game Development
Mini Tank Game
In this mini project, a 3D model for a tank was created from scratch using 3DS Max. This model was then implemented into unity, animations were created and the ability to fire shots was implemented.
This code snippet shows how the tank is moved and rotated based on the input of the player.
This code snippet checks to see if there is any input from the player. If there is, then the tank is not idling.
This code snippet updates the position of the camera based on the position of the tank.
This code snippet allows for the barrel of the tank to be rotated when the scroll wheel is scrolled.
This code snippet checks if the fire button is being pressed, and if it is a shot is instantiated.
This code snippet checks for how long a shot has existed for, and once it reaches the maximum time, it is deleted.
These images show how the animations were blended together so the tank would move properly based on the player's inputs.