Tutorial 3


So I've been learning how to make terrain in unity using Terrain Tools and Probuilder.

For my first attempt I added a terrain to my scene and sculpted it to be a desert type of place because it's simple.


Then I added a bunch of shipping containers to make it a sort of post-apocalyptic junk heap as a maze for the navmesh.

I then applied the navmesh to the terrain. This generates an area that unity AI can use to traverse the map (the blue).


Here I am at my Tasmanian landmark scene and I have imported the model from the previous week. I have written a script to have him follow my player capsule using unity AI. I also made a script that tracks his speed and makes him run faster or slower depending on his velocity and change his animation to an idle stance when not moving.

You can see that it works well at finding the fastest route through the level.


Here I am testing how the enemy pathing works with moving obstacles in the way.  You can see him try to actively avoid the path of the obstacle. 


Lastly, I have made it so that my enemy predicts my movements. As you can see here the woodman is running to where I was heading. This is a bit of a copout, though because there's not a script or something using mathematical equations to track my speed versus my position or something like that. I just set my capsule as a "navmesh obstacle" and set it to "curve" which is the same process as making the moving obstacle. it's just the same as them trying to move out of the way of the block.

Leave a comment

Log in with itch.io to leave a comment.