Movement and Patrol Speed

So for this challenge, I just made an overloaded method for StartMoveAction that takes an additional parameter - float moveSpeed. This is then passed to the navmesh agent. I also added in a moveSpeed value that the Mover stores. (if the ‘normal’ StartMoveAction is called, it also explicitly sets the navmesh agent’s movespeed to the mover’s moveSpeed). Then, in Cancel() (which is called, for example, when cancelling the movement action and going into the attack action - aka pursuit) the navmesh agent’s speed then gets reset to the Mover’s stored movement speed.

Anyways, just a solution I found that’s a bit more straight forward and doesn’t involve multiplying percentages

3 Likes

Privacy & Terms