1 min
The seventh CGD blog post about Don’t Walk By
This week I added a ContinueDefaultBehavior
function to the Ai script as well as a points of interest system. I also added a few minor changes.
Previously the function to set the ai to go into the default state behavior was StartDefaultBehavior
which would make the ai to find a new point to path to. This was called from the RevertState
meaning that for the puddle for instance once the ai left it and reverted their state there was a high chance they would go back through the puddle. ContinueDefaultBehavior
stops this by storing what destination they were going to in default state are then pathing to that value again when the function is called.
Up till now the ai in default state has just pathed to random points which is not ideal because it produces unpredictable movement. To deal with this I implemented a POI system. Any gameobject that has the PoiPoint script on it becomes a poi and ai will path to it. What poi the ai paths to is decided by PointsOfInterest script which gives ai a random poi except the one they’re currently at.
SpawnServicePawn
now returns the service pawn gameobject
Subscribe to this blog via RSS.
C++ 30
Directx12 11
Mario kart 11
Commercial games development 15
Unity 15
Low-level programming (19) C++ (30) Text based adventure (5) Ex-machina (9) Game engine programming (11) Directx12 (11) Mario kart (11) Land of gold (5) Audio visual production (1) Commercial games development (15) Unity (15) Don't walk by (15)