I’m using a standard character controller for movement, but I notice that in the AIPath script, the movement is controlled with this code:
controller.SimpleMove (dir);
This causes the character to skate sideways toward the target. I’d like the character movement to always be in the forward direction and then turn toward the target. Is there a simple way to do this?
By the way, I’m using a character controller because I’m using a kinematic rigidbody and animating physics. I’d rather use an RVO controller, but I don’t have too many AI characters so I’m hoping performance will be ok.
I missed some part of the code. Here is the full Update function. If nodes are close together it can be a bit twitchy, but adjusting rotation speed and using modifiers helps on that.
I used this for moving a truck on roads using a point graph, and it stayed in its line.