Is it possible to create a device for the body that can be broken by any other body?

I really want to know if it is possible to create a device for the body that can be broken by some other body?

There is an example:

  • body with its device, divided into small figures:
  • and what happens after he got into another body:

Ps Are there any programs that could help in the creation of such equipment?

+4
source share
1 answer

yes, you can do this using Breakablefound at:

net.dermetfan.gdx.physics.box2d.Breakable

The Breakable , , , .

A Breakable , . Breakable , . Box2DSprite , $Manager Function Breakable , . ContactListener destroy() timestep. , ContactMultiplexer. , Breakables .

A Breakable , , , .

normalResistance - , , (). tangentResistance - Breakable ( ). reactionForceRestiance , . reactionForceLength2Resistance - , Breakable.

libgdx-utils

(Are there any programs that could help the process of creating such fixture)

, box2d-editor, , , , , box2d-:

:

  • ,
  • , ,
  • ,
  • ,
  • ,
  • ,
  • ! , ,
  • , LibGDX ( Java),
  • (JSON), .
+5

All Articles