I want to make a destructible rigid body from cubes. I see only two ways:
- Complex body. But how to separate it into pieces? (every piece must be an animated sprite)
- Weld joint. But they are not rigid.
What to do?
I want to make a destructible rigid body from cubes. I see only two ways:
What to do?
Hi @mahrizh,
Unfortunately, this might not be possible, because each “piece” must be animated separately. It’s a complex workaround, but you could assemble a complex body from many smaller cube bodies, and then use PhysicsContact and selective “on/off” pre-collision filtering to determine which of those pieces reacts, collision-wise. Then, you could create your visual representation of this body by putting the sprites into separate display groups that are part of a parent display group, and “synching” that group’s position and rotation with the body’s position and rotation in a Runtime listener.
It’s a complicated solution, but I suspect it might be the only way to achieve everything that you describe.
I suppose you could also try to use multiple weld joints between cubes for greater stability… i.e., you join a particular cube to all of its neighboring cubes, theoretically leading to an almost-fully-rigid construction.
Best regards,
Brent Sorrentino
Hi @mahrizh,
Unfortunately, this might not be possible, because each “piece” must be animated separately. It’s a complex workaround, but you could assemble a complex body from many smaller cube bodies, and then use PhysicsContact and selective “on/off” pre-collision filtering to determine which of those pieces reacts, collision-wise. Then, you could create your visual representation of this body by putting the sprites into separate display groups that are part of a parent display group, and “synching” that group’s position and rotation with the body’s position and rotation in a Runtime listener.
It’s a complicated solution, but I suspect it might be the only way to achieve everything that you describe.
I suppose you could also try to use multiple weld joints between cubes for greater stability… i.e., you join a particular cube to all of its neighboring cubes, theoretically leading to an almost-fully-rigid construction.
Best regards,
Brent Sorrentino