filbs111 / box2d-learning

0 stars 0 forks source link

add dynamic bodies inside destructible level #17

Open filbs111 opened 7 years ago

filbs111 commented 7 years ago

eg boulders that fall once the destructible earth surrounding them is destroyed. hopefully doable by: subtract path from level. add dynamic body in place. conceivably problematic since the level collision is via edge shapes.

filbs111 commented 7 years ago

TODO rock shapes, setup code to define shape once, and use for both clipping and dynamic body.

filbs111 commented 7 years ago

done. problem: path array appended to level, which is fine if entirely over solid part of level, but if hole if outside of existing solid area, will add to level. not sure if should use clip instead of append, or if can fix simply by using ClipperLib.PolyFillType