I’ve been trying to switch over to the pro version, but I’m getting all kinds of weird behaviour now.
In the earlier version, I had a character that would move towards a waypoint, and when she got near, the waypoint would move, so she’d have to keep going. In this version, the character would never stop when planning the next one, just keep going. And if she needed to go back the way she came, she’d sort of do a u-turn - therefore always moving forward even while turning.
In the pro version, this character has become super jerky with her movements. Throughout the whole path towards a waypoint, she keeps flipping back and forth and can’t seem to smooth out her walk. Then, when she hits the end reach distance, she stops and waits for a new path. And if the new path needs her to go back the way she came, she rotates on the spot instead of moving forward.
I really like the old behaviour much better - it looks a lot more natural, as the character is running and unlikely to stop to turn. But, I can’t figure out what has changed between the two that is causing the new behaviour. It seems like it should still be the same as the old.
I’ve checked those. I’m using the exact same set of values in both scenes, just getting extremely different behaviour. I’ve also tried using the RVO vs the character controller, and both produce bad behaviour.
However, it’s definitely worse using the RVO. When the character has the RVO on, when walking a relatively straight path, she look side to side constantly, so that she ends up more on a zig-zag path. With the character controller, she at least moves mostly straight, but still stops when she hits the end.
Hmm… I really can’t figure out what’s going on, but I’ve “solved” it for now by changing a little bit of the code in AIPath. Specifically, in CalculateVelocity: