Maybe it can be achieved by exporting the state from Physics, something similar like useThree(), but then usePhysics() from there I could manipulate state.world.
Another idea is to expand the step prop from the Physics component so that it allowed the timeSinceLastCalled too, just like p2-es: http://schteppe.github.io/p2.js/docs/classes/World.html#method_step
Then you would be able to pause and resume using step={[0, delta]} without the engine playing catch up if you resume with step={[1/60, delta]).
Maybe it can be achieved by exporting the state from
Physics
, something similar likeuseThree()
, but thenusePhysics()
from there I could manipulatestate.world
.Another idea is to expand the step prop from the
Physics
component so that it allowed thetimeSinceLastCalled
too, just like p2-es: http://schteppe.github.io/p2.js/docs/classes/World.html#method_step Then you would be able to pause and resume using step={[0, delta]} without the engine playing catch up if you resume withstep={[1/60, delta])
.