box2d
box2d copied to clipboard
Features and fixes from base box2d
This PR includes 3 changes that the base box2d project has adopted:
-
Wake B2Body on setLinearVelocity or setAngularVelocity: Currently, if one of these functions is called on a sleeping body, the body remains stationary. The solution is to wake bodies when either of these functions are called with non-zero values.
-
Change restitution threshold to be per-fixture: This replaces the global setting b2_velocityThreshold with a per-fixture setting that allows for customization of the cutoff velocity for elastic collisions.
-
Fix B2Body setActive(true) first frame: This ports a simple bugfix for setActive(true) on a B2Body not considering collision for that body on the first frame