We Implemented basic First Person Shooter mechanics without animations. We have the ability to move, look and fire object include detection and activate a function at the object that got hit.
Will control the player using a player controller component and inputs of WASD keys and mouse. We added the ability to jump by adding velocity to our player. Movement and gravity script:
We used Raycasthit class and calculated if we hit something when we shoot. We raycast from our FPS camera position in the forward direction. If we hit an Enemy – we will activate his takeDamage function. We also will Instantiate Impact effect on the hit position and muzzle flash at the gun barrel.
Each enemy have health and public takeDamage() function that will be called when we hit him with the gun shoot, the function will decrease his health. When health is less then 0 – we will destroy the enemy object by calling Die() function.



