RichAI Flies away on unpause

Hello,
I’m having a strange issue: when a RichAI is moving, and I pause the game and then unpause it, sometimes the AI ends up flying away at super fast speeds. I tried enabling “isKinematic”, which solves it, but then it no longer collides with the environment…

Hello, hate to bump, but I’m still very stuck with this.

Hi

If you convert this to a non-physics object, does that still happen?

When I remove the rigidbody, it looks like the npc no longer flies away, yes

I finally found the solution. Turns out it has nothing to do with AStar, but instead a strange unity quirk, where awake rigidbodies (may) fly away when unpausing the game. Here’s the solution:

I personally built a tool that automatically searches through all rigidbodies in the game and applies this fix, instead of requiring each rigidbody in the game to be manually updated when pausing. I’m so glad it works! :smiley:

2 Likes