Presentation is loading. Please wait.

Presentation is loading. Please wait.

Unity Game Development

Similar presentations


Presentation on theme: "Unity Game Development"— Presentation transcript:

1 Unity Game Development
Creating a Top Down Shooter

2 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

3 Revision Lighting C#: Variables, Functions & Code grouping
Creating & adding scripts to GameObjects Time.deltaTime Rigidbody CharacterController Input Jumping Logics Audio & Importing Assets

4 Parenting objects in Hierarchy
Drag GameObject onto other GameObject  Creates hierarchy Moving, rotating, scaling parent object affects child objects

5 2D Movement  3D Movement Horizontal input used as Movement in X axis
Vertical input used as Movement in Z axis

6 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

7 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!

8 Shooting & Spawning Bullets
1. Check Ammo 2. Check Cooldown 3. Spawn Bullet 4. Update Ammo & UI

9 Canvas UI Use Canvas System to add UI elements on screen
Display Bullet Ammo in Text

10 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

11 Applying Textures to Materials
Create Material Click on small circle left of Albedo Select Texture Setup Tiling X and Tiling Y if needed

12 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.

13 Advanced: New Weapons Add a New Weapon like a Machine Gun, Shotgun and / or Rocket Launcher?!

14 Q&A Do you have any questions related to the topics mentioned?


Download ppt "Unity Game Development"

Similar presentations


Ads by Google