Registering explosion and crack shapes
Commonly used to register new explosion and crack shapes in the physics engine by using 2 functions from the Lua global Physics.
Physics.RegisterExplosionShape( sGeometryFile, fSize, BreakId, fProbability, sSplintersfile, fSplintersOffset, sSplintersCloudEffect )
Registers a boolean carving shape for breakable objects in the physics engine.
boolean shape cgf filename
shape's 'characteristic' size
breakability index (0-based), used to identify the breakable material
shape's relative probability – when several shapes with the same size appear as candidates for carving, they are selected with these relative probabilities
splinters cgf filename, used for trees to add splinters at the place where it broke
helper size offset for the splinters
splinters particle fx name – is played when a splinters-based constraint breaks and splinters disappear
Physics.RegisterExplosionShape( sGeometryFile, BreakId )
Registers a new explosion crack for breakable objects in the physics engine.
crack shape cgf name (must have 3 helpers that mark the corners, named "1","2" and "3")
breakability index (same meaning as for the explosion shapes)