Posted August 17, 2022 by Unsighted
The additional commands for specific actions brought their own challenges to the project.
Looting
As the character is an AI agent that requires player input to control it, moving to a specific spot is not as simple as just walking up to it. Most interactions required specific overrides to behaviour or extra navigation waypoints.
Looting in particular was the first and most obvious issue. When the player tried to loot something, the agent would move to the nearest point on the navmesh to the loot and then grab it, which is fine, until the nearest point on the navmesh is on the other side of a wall, shelf, or other obstacle and suddenly your character is running halfway around the map to grab the loot that was right in front of him!
Stairs
In the prototyping stage for the controls, placeholder stairs in the scene were very narrow, and more precise controls were not available for lining up the agent on a staircase, so an override command to navigate a staircase was added. While this command functions fine, some playtesters were attempting to navigate the stairs manually now that it was not unreasonable to line up on a staircase. This however unveiled another issue. The character would get to almost the top of the staircase and then stop. It turns out that as the agent was looking in front of themselves as they moved with a raycast, they were seeing the side wall, shelving, or walkway that the stairs were going to the top of and detecting an obstacle and stopping before they walked into it.