3. As the gap between frames starts to get bigger, the delta between frames increases. Because I'm stepping the box2d world by this amount, it's stepping further in the physics world because the delta is larger.
That sounds like the correct way to do it - you want to step the physics world further when more time has passed since the last tick. I guess there must be a bug in the way you handle ticks.
I remember having a similar problem with the Physics behavior in Classic: the world needs to be ticked once per tick no matter how many instances there are. The solution is to keep a tick count in the behavior of the last tick number that the world was ticked. runtime.tickcount in C2 gives you the number of ticks that have passed so far, so your tick code per instance is something like:
if (this.behavior.lastTicked < this.runtime.tickcount)
{
tickTheWorld(); // whatever function to advance the physics simulation
this.behavior.lastTicked = this.runtime.tickcount;
}
This way no matter how many instances you have, the entire behavior is only advanced once per tick. I bet it speeds up when you add more instances because more than one instance is advancing the physics.
ou should add an onDestroy callback sometime as well. It'd be a lot more easier. But thanks for that anyway.
Isn't that exactly what addDestroyCallback is? Or do you need something else?