Posts

Showing posts from October, 2018

Day 5

Image
Artificial intelligence - Patrolling and way points As part of my game I decided to use wooden crates as way points. Each crate has a tag which is also defined in the script that marks them as way points for the AI character to walk past.  The code below defines the base values for the script above but also acts as a core for the patrol state.  Using the script in the animator In order to pump life into the AI characters in my game I used Animator to link the patrol node to my entity as seen in the picture below. The AI character will keep on running from one way point to another because there is no exit state attached to the "Entry" node. Patrolling in action

Day 4

Image
Artificial intelligence - recognising and attacking the player character I wrote a C Sharp script for the AI character to change colour when it sees the player and when the player gets in the attack radius, the AI will chase the player. The code below defines the AI character's behaviour when it sees the player.  To make things easier, many variables such as "attack distance" can be changed. 

Day 3

Image
Implementing Navigation and Navigation Agent meshes The picture below demonstrates navigation so that AI character know the path to walk and acknowledge the obsticles AI characters also require a component to make them understand the navigation.

Day 2

Image
I downloaded Unity standard assets to get a basic first person controller script. The picture below shows how it is implemented. The first person controller provided by Unity comes with all basic settings needed for a first person shooter player character