I have a scenario where I have a fixed update happening in my scene.
Every update, I would like to create a shadow, using the sprites previous position.
func update(currentTime: NSTimeInterval)
{
shadow.position = sprite.position
}
Now when any I apply an impulse to the sprite, I want the sprite to increment the same number of steps regardless of how much time was actually used to get to the next update frame.
However, this is not the case, as when comparing the shadow on my simulator to the shadow on my device, the distance between the two is very different.
E.G. It took my phone 1 second to move the sprite 60 steps It took my simulator 2 seconds to move the sprite 60 steps
In the fixed update world. both took 60 frames to achieve, the simulator just lagged.
The actual results however will put the simulator at 120 steps
I tried disabling asynchronous
on the SKView
in hopes that would get me fixed updates, but that got me nowhere, so I am asking if anybody knows how to get SKPhysics to work on a fixed update framework.