Tutorial 3


Covering the content in the third tutorial of KIT207 involved adding Navmeshes to surfaces, and Raycasting. After downloading the sample scene from MYLO,  I baked a simple Navmesh onto the surfaces of the scene, using OffMeshLinks turned on so an agent may jump over certain gaps.

I then added a capsule to the scene and coded out a C# script in order to raycast to where the mouse is clicked in order to give it a position to move to, where it will follow the Navmesh to the given spot.

This worked rather well with no issues once a few syntax errors were fixed.

The next step was to add a moving  block that "Carved" a space out of the Navmesh so that the Capsule would attempt to go around it. I gave this block an animation to move back and forth between two points. I then ticked the "Carve" box in the "Nav Mesh Obstacle" properties in order to update the Navmesh as the block moved. I then re-baked the Navmesh.

This worked, somewhat. The Capsule does have a hard time navigating as the block moves rather quickly, but the Navmesh is definitely moving so I would call this a success.

Get UTAS KIT207 Portfolio

Leave a comment

Log in with itch.io to leave a comment.