UNITY GAME DEVELOPMENT Raycasting Animation timeline Animator CLASS

  • Slides: 15
Download presentation
UNITY GAME DEVELOPMENT Raycasting, Animation timeline & Animator

UNITY GAME DEVELOPMENT Raycasting, Animation timeline & Animator

CLASS OVERVIEW Class 3 Revision Raycasting – Camera-to-World Nav. Mesh Baking & Nav. Mesh

CLASS OVERVIEW Class 3 Revision Raycasting – Camera-to-World Nav. Mesh Baking & Nav. Mesh Agent Click Visualisation Camera Movement Importing 3 D models Animation timeline Animation events Animator Raycasting – Game. Object-to-Game. Object Enums – Player States Advanced: Applying Damage

REVISION Parenting objects in Hierarchy Canvas UI Enums – Enemy States Nav. Mesh Baking

REVISION Parenting objects in Hierarchy Canvas UI Enums – Enemy States Nav. Mesh Baking Nav. Mesh Agent Setting Enemy Patrols Range & Radius Checking Damage to Player Damage to Zombies

RAYCASTING – CAMERA-TO-WORLD Raycast = Shoot Laser from point A to point B, check

RAYCASTING – CAMERA-TO-WORLD Raycast = Shoot Laser from point A to point B, check for objects hit (= Ray. Cast. Hit). Raycast from Camera to Mouse Position in World Space.

NAVMESH BAKING & NAVMESH AGENT Attach Nav. Mesh. Agent to Player Setup Steering Settings

NAVMESH BAKING & NAVMESH AGENT Attach Nav. Mesh. Agent to Player Setup Steering Settings Window AI Navigation Make objects Static in order to bake Nav. Mesh

CLICK VISUALISATION Display Sphere where Player Clicked Shrink Sphere Object over time

CLICK VISUALISATION Display Sphere where Player Clicked Shrink Sphere Object over time

CAMERA MOVEMENT Move Camera based on Mouse Position in Screen Space Center Camera on

CAMERA MOVEMENT Move Camera based on Mouse Position in Screen Space Center Camera on Player when you press Spacebar

IMPORTING 3 D MODELS Download. FBX file Import in Unity editor Example websites: https:

IMPORTING 3 D MODELS Download. FBX file Import in Unity editor Example websites: https: //www. turbosquid. com/Search/3 D-Models/free https: //free 3 d. com/ Unity Asset Store

ANIMATION TIMELINE Window Animation Add Keyframes and change properties such as position, rotation, scale,

ANIMATION TIMELINE Window Animation Add Keyframes and change properties such as position, rotation, scale, …

ANIMATION EVENTS Right-Click Add Animation Event Link Animation. Event to Code Function

ANIMATION EVENTS Right-Click Add Animation Event Link Animation. Event to Code Function

ANIMATOR Setup Idle & Sword. Anim States Setup Parameters & Set Parameter from Code

ANIMATOR Setup Idle & Sword. Anim States Setup Parameters & Set Parameter from Code

RAYCASTING – GAMEOBJECT-TO-GAMEOBJECT Shoot Ray forwards from Player Position.

RAYCASTING – GAMEOBJECT-TO-GAMEOBJECT Shoot Ray forwards from Player Position.

ENUMS – PLAYER STATES Idle Moving Attack. Moving If Player clicks on Enemy move

ENUMS – PLAYER STATES Idle Moving Attack. Moving If Player clicks on Enemy move Player towards Enemy. Start Attacking when in Range.

ADVANCED: APPLYING DAMAGE Implement Health system Reduce Enemy Health on Sword Impact

ADVANCED: APPLYING DAMAGE Implement Health system Reduce Enemy Health on Sword Impact

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

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