Hello,
I'm currently trying to implement a "sticky ball" sort of game. A user controlled ball rolls around and when it hits other balls, they stick to it and the accumulated mass rolls around together (think Katamari Damacy). I'm currently trying to decide on two different approaches:
1. On contact, create very stiff prismatic joints.
2. On contact, merge the two bodies in some way (either recreate a unified body from the shapes of both objects, or add the shape of the contacted-with body to the main player body).
I've currently got it semi working using the first approach, but the glued-together bodies become difficult to manage - mostly because all of the accumulated bodies all have separate contact lists. It would be easier if I could just inspect the contact list of one body.
So... has anyone been successful in dynamically adding shapes to existing bodies? Is their another approach that may be easier than either of these methods? I'm just looking for suggestions.
Thanks!
I'm currently trying to implement a "sticky ball" sort of game. A user controlled ball rolls around and when it hits other balls, they stick to it and the accumulated mass rolls around together (think Katamari Damacy). I'm currently trying to decide on two different approaches:
1. On contact, create very stiff prismatic joints.
2. On contact, merge the two bodies in some way (either recreate a unified body from the shapes of both objects, or add the shape of the contacted-with body to the main player body).
I've currently got it semi working using the first approach, but the glued-together bodies become difficult to manage - mostly because all of the accumulated bodies all have separate contact lists. It would be easier if I could just inspect the contact list of one body.
So... has anyone been successful in dynamically adding shapes to existing bodies? Is their another approach that may be easier than either of these methods? I'm just looking for suggestions.
Thanks!