This week in class we went over events. I found them really interesting in the way that they can be created and just added to without that much extra code.
In the inspector, the events have their own UI which allows the user to add listeners. It makes it much easier to add listeners than it is to add them in code.
With this we also got our second assignment. We need to create a typing based game which use events, states and NavMesh movement. We were shown examples in class and I think I will go for an enemy wave typer game. Enemies will come at the player and they need to type words in order to kill them.
On the topic on NavMesh, I found them quite complex yet also quite simple. You're able to set up areas with different costs, so that having a path going through it might be more or less desirable. An example would be if there were 2 paths to a target. One over a bridge and another through water. The cost of going over the bridge would be much less than going through the water, so the agent would most of the time go over the bridge. If it was blocked by something though, the agent would go through the water.
The image above shows the agent options for the navmesh. The Agent Radius is the thickness of the agent character. From what I could see, this is also the distance that the navmesh edges will be from the obstacles. I don't really like this and believe that the distance should be a separate option. Because what this does is that is makes the agents hug the walls when moving or turning corners. This looks bad and unrealistic so I set the agent radius to around 2 or 3 times the actual radius, so that there was a gap when turning corners. It makes it look more realistic.
One thing I really like though is the Max Slope and Step Height. You're able to choose the max angle of which an agent can walk up as well as the highest step they can take. The step height could be used for stair cases, yet that will probably make the agent jump, so having the staircase as a slope would be a better option.