jit.phys unstable cubes
Hello,
I encounter some problems with jit.phys objects with cube shape: they tend to be unstable (in position). In the example below, towers of cube are falling down without any particular event. Within Box2D, boxes towers are stable. It's also ok if shape=sphere.
Is there a way (or a trick) to have the expected behavior with jit.phys cubes?
Thanks,
Jean-Michel
I suspect that there is a small space between each box where collisions are occurring.
hi JMC.
there's a few things you can do to help this situation.
most importantly, you can increase your physics timestep resolution, by increasing the @fixedtimestep to 240 and increasing the @maxsubsteps to 5 or so.
additionally, you can increase damping, decrease restitution, and try different adjustments of friction.
lastly, there's the @enable_sleep attribute, which will cause dynamic bodies that aren't moving to be removed from the simulation, until @enabled_sleep is turned off, or they collide with another rigid-body. this will also save processing power.
in the next update, there will be an attribute for phys.world, called split_impulse, which disabling may help this specific case.
also, you will be able to increase the physics timestep beyond 240.
hope this helps.