Tech Blog - Week 3
- Ryan Vafiadis
- Jan 21, 2017
- 1 min read
Began work on AI functionality for Rallying behavior and Orbiting behavior.
I thought about various design techniques for both behaviors. The rallying behavior should set every team mate's new destination to some area near the player, this effect could continue until the player toggles off rallying or sends the enemy elsewhere. Enemies should still be targeted while the team mates under this effect, so that they do not simply idle.
Arrived at some issues when trying implement the rallying functionality, the variables referenced in a public mutator function didn't appear to be toggling on and off. Will need to come back to this later.
I wanted to implement a kind of strafing movement after orbiting movement was implemented. I began by measuring the distance the enemy would need to stop from the player. At which point they would orbit to the right or left, while continuously facing the player. I also wanted to have some kind of weaving movement so that walking wasn't so linear.
Had computer issues that caused me to be unable to do much of anything on the project for a few days. PC was finally fixed on Thursday and after that I was trying to catch up with the workload.
Restructured the design of the AI's state machine and fixed an error with the AI's camera interpolation when turning, used SLERP and changed the rotation cap on the Nav Agent.
Was able to implement some orbiting functionality. Found an odd problem with the Fleeing state, not 100% sure what's going wrong, may have something to do with the obstacles on the nav mesh.
Comments