Tutorial 3
Tutorial 3's content was about adding a navmesh to my existing terrain with the windmill so AI can navigate the terrain and buildings with the aim to make them chase the player.
Adding a navmesh adds an area highlighted in blue which shows the area an AI can move in and also off mesh links which are the lines seen on the garage on the left which connect a circle to another circle. These circles are the positions the AI can jump/fall from, allowing the AI to traverse an area and follow the player even if they are jumping off buildings. Moving objects can also affect the navmesh and force the AI to navigate around it although this can make the game lag if there are too many objects affected the navmesh. I added a big rectangle and made it move in a triangle which the AI had to navigate around. As you can see in the above picture, there is an area around the rectangle that isn't blue and as the rectangle moves, that area moves with it.
I added the character I made for Tutorial 2 as the AI character which would chase the player who is a barrel. The AI are spawned by clicking somewhere in the game which will spawn an AI character. This was done using ray casting which basically shoots a laser from the camera the player is looking through to the position that was clicked and then spawning the AI there.
I also gave the AI an ability to predict where the player is going depending on the player's speed so when the player is moving, the AI moves to a position ahead of the player. This allows the AI to intercept the player as the AI will arrive at the player's destination at the same time rather than always being behind the player if they weren't able to.
UTAS KIT 207 Portfolio
Status | In development |
Author | xenophaze |
More posts
- Tutorial 5Aug 25, 2022
- Self Study 5Aug 16, 2022
- Self Study 4 - Game IdeasAug 09, 2022
- Self Study 4 - UnityAug 09, 2022
- Self Study 3Aug 01, 2022
- Tutorial 2Jul 27, 2022
- Self Study 2Jul 26, 2022
- Tutorial 1Jul 23, 2022
- Self Study 1Jul 18, 2022
Leave a comment
Log in with itch.io to leave a comment.