Genbox / VelcroPhysics

High performance 2D collision detection system with realistic physics responses.
MIT License
666 stars 113 forks source link

When adding fixture with a shape, only calculate the delta mass #32

Open Genbox opened 7 years ago

Genbox commented 7 years ago

When we register a fixture to a body, it's shape's density has to be taken into account. We do this by iterating ALL shapes again and resetting the mass data. We could just add the density as a delta to save some computation.