Skips destination on low FPS, high TimeScale

I’m trying to make a demo using this plugin combined with Unity’s MLAgent offering. The problem is that when I try to train the agent it often fails to reach it’s destinations and will go off in some really long straight line or spin in circles.

With MLAgent training, the TimeScale jumps up to 20 and the FPS drops to something around 5. I can use Time.timeScale = 20.0f; and Application.targetFrameRate = 5; to reproduce the problem easily if I want to avoid using the MLAgent stuff.

Is there a solution to make it reach it’s destination properly in this low performance situation?

Resolved by commenting out the MovementUpdate code in Update, and using FixedUpdate instead.

2 Likes