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
Raycasting, Animation timeline & Animator

2 Class overview Class 3 Revision Raycasting – Camera-to-World
NavMesh Baking & NavMesh Agent Click Visualisation Camera Movement Importing 3D models Animation timeline Animation events Animator Raycasting – GameObject-to-GameObject Enums – Player States Advanced: Applying Damage

3 Revision Parenting objects in Hierarchy Canvas UI Enums – Enemy States
NavMesh Baking NavMesh Agent Setting Enemy Patrols Range & Radius Checking Damage to Player Damage to Zombies

4 Raycasting – Camera-to-World
Raycast = Shoot Laser from point A to point B, check for objects hit (= RayCastHit). Raycast from Camera to Mouse Position in World Space.

5 NavMesh Baking & NavMesh Agent
Attach NavMeshAgent to Player Setup Steering Settings Window  AI  Navigation Make objects Static in order to bake NavMesh

6 Click visualisation Display Sphere where Player Clicked
Shrink Sphere Object over time

7 Camera Movement Move Camera based on Mouse Position in Screen Space
Center Camera on Player when you press Spacebar

8 Importing 3D models Download .FBX file Import in Unity editor
Example websites: Unity Asset Store

9 Animation timeline Window  Animation  Animation
Add Keyframes and change properties such as position, rotation, scale, …

10 Animation events Right-Click  Add Animation Event
Link AnimationEvent to Code Function

11 Animator Setup Idle & SwordAnim States
Setup Parameters & Set Parameter from Code

12 Raycasting – GameObject-to-GameObject
Shoot Ray forwards from Player Position.

13 Enums – Player States Idle Moving AttackMoving
If Player clicks on Enemy move Player towards Enemy. Start Attacking when in Range.

14 Advanced: Applying Damage
Implement Health system Reduce Enemy Health on Sword Impact

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


Download ppt "Unity Game Development"

Similar presentations


Ads by Google