1 / 15

Unity Game Development

Unity Game Development. Raycasting , Animation timeline & Animator. 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

cwortham
Download Presentation

Unity Game Development

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Unity Game Development Raycasting, Animation timeline & Animator

  2. Class overview • Class 3 Revision • Raycasting – Camera-to-World • NavMeshBaking & 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: • https://www.turbosquid.com/Search/3D-Models/free • https://free3d.com/ • 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?

More Related