WebGL throttling effecting somethings but not others.

I know the browser throttles inactive tabs, but my idle game involves pulling gold pieces with rigidbodies towards a chest to collect them. When they touch the chest they get destroyed.

The gold pieces spawn every few seconds, and everything works fine when the tab is focused. But when unfocused it seems the chest stops pulling them, but they keep spawning. Making a big mess of goldpieces that don’t get destroyed.

So anything I can do?

Pause when the window doesn’t have focus?

and mebbe here: Returning focus to webGL - Unity Engine - Unity Discussions

it’s an idle game, so pausing wouldn’t help. Well if I’d like the players to be happy :stuck_out_tongue:

Anyway I fixed it by multiplying by “time.fixedDeltaTime”

When pulling the gold to the chest.