victorfisac / Physac

2D physics header-only library for videogames developed in C using raylib library.
http://www.victorfisac.com/physac
MIT License
434 stars 29 forks source link

Shatter created physics bodies have a strange behaviour #6

Closed victorfisac closed 7 years ago

victorfisac commented 7 years ago

When shattering a physics body, new little bodies are created with a portion of the shape (based on triangles) to simulate that the shape is broken in little parts.

When trying to shatter these new little parts using same force value, they gets a strange amount of force and direction (and sometimes torque) that it is not the expected. Maybe it happens because new physics bodies doesn't have its position at the barycenter of the triangle shape...

b78f035016dbdca3afb927b3a6485849

victorfisac commented 7 years ago

Fixed in commit: 6891f16