Unity Game Development Creating a Top Down Shooter
Class overview Class 1 Revision Parenting objects in Hierarchy 2D Movement 3D Movement Character Rotation to Mouse Position Prefabs (Bullets, Ammo Crates) Shooting & Spawning Bullets Canvas UI Targets! Applying Textures to Materials Advanced: Weapon Equipment Advanced: New Weapons
Revision Lighting C#: Variables, Functions & Code grouping Creating & adding scripts to GameObjects Time.deltaTime Rigidbody CharacterController Input Jumping Logics Audio & Importing Assets
Parenting objects in Hierarchy Drag GameObject onto other GameObject Creates hierarchy Moving, rotating, scaling parent object affects child objects
2D Movement 3D Movement Horizontal input used as Movement in X axis Vertical input used as Movement in Z axis
Character Rotation To Mouse Position 1. Detect Mouse Position in Screen Space 2. Convert Player’s World Position to Screen Space 3. Subtract Player Screen Space Position from Mouse Screen Space Position 4. Use Mathematics to get Angle from Vector (Atan) 5. Apply Angle Rotation to Player
Prefabs (Bullets, Ammo Crates) Dragging GameObjects from Scene to Prefabs folder creates a Prefab Prefabs are displayed in Blue in Scene Hierarchy Prefabs share attributes!
Shooting & Spawning Bullets 1. Check Ammo 2. Check Cooldown 3. Spawn Bullet 4. Update Ammo & UI
Canvas UI Use Canvas System to add UI elements on screen Display Bullet Ammo in Text
Targets! Add some Targets and Destroy them on Impact. Turn the Bullet’s Collider into a Trigger Implement OnTriggerEnter on the Target. Add a Tag to Bullet called “Bullet” Check for this Tag in OnTriggerEnter
Applying Textures to Materials Create Material Click on small circle left of Albedo Select Texture Setup Tiling X and Tiling Y if needed
Advanced: Weapon Equipment Try and make the character Equip a Weapon by Picking it up by pressing a button. Make the character able to Equip and Unequip a Weapon.
Advanced: New Weapons Add a New Weapon like a Machine Gun, Shotgun and / or Rocket Launcher?!
Q&A Do you have any questions related to the topics mentioned?