Fracture : Helper

Fracture - superclass: Helper; super-superclass:Node - classID: #(399051846, 1473446478)

Description:

The fracture feature simulates the breaking of a rigid body into a number of smaller pieces as the result of an impact. To do this, you need to supply the pieces that are glued together to create the whole object. Rigid bodies that are part of a fracture helper move as one compound body. When a collision between a rigid body that belongs to a fracture helper and another body occurs, the collision information is analyzed and if a threshold is exceeded, the rigid body will be removed from the fracture helper. Once the rigid body has been removed, it will move independently of the fracture object and will be free to collide with the rigid bodies that are still part of the fracture object.

Constructors:

Fracture ...

rctFracture ...

Properties:

.impulse : float

Get/Set the breaking impulse value. Used when .breakAlgorithm is set to 0.

.energyLoss (Energy_Loss) : float

Get/Set the energy loss value.

.disabled : boolean

When set to true, disables the Fracture.

.showBoundingBox (Show_Bounding_Box) : boolean

When set to true, shows the bounding box of the Fracture.

.breakAlgorithm (Break_Algorithm) : integer

Get/Set the break algorithm. Possible values are:

0 - Break On Impulse

1 - Break On Velocity (default)

.velocity : float

Get/Set the breaking velocity value. Used when .breakAlgorithm is set to 1.

.useConnectivity (Use_Connectivity) : boolean

Corresponds to the "Use Connectivity" checkbox in the UI.

Interfaces:

Interface: rctFractureInterface

Properties:

.pieces : node by value array : Read|Write

Get/Set the array of Fracture pieces.

.disabled : boolean : Read|Write

When set to true, disables the Fracture.

Methods:

<boolean>addPiece <node>node

Adds a piece node to the Fracture. Returns true on success.

 

<boolean>removePieceIndex <integer>index

Removes the indexed piece node from the Fracture. Returns true on success.

 

<boolean>removePiece <node>node

Removes the specified piece node from the Fracture. Returns true on success.

 

<integer>getNumPieces()

Returns the number of pieces in the Fracture.

 

<enum>getPieceType <node>piece

getPieceType enums: {#normal|#unbreakable|#keystone|#autobreak}

Returns the type of the specified piece.

 

<void>setPieceType <node>piece <enum>type

type enums: {#normal|#unbreakable|#keystone|#autobreak}

Sets the type of the specified piece to the supplied enum name.

 

<time>getPieceAutoBreakTime <node>piece

Returns the Auto-Break Time of the specified piece as time value.

 

<void>setPieceAutoBreakTime <node>piece <time>time

Sets the Auto-Break Time of the specified piece to the supplied time value.

 

<time>getPieceBrokenTime <node>piece

Returns the Broken Time of the specified piece.

 

<void>resetPieceBroken <node>piece

Resets the Broken state of the specified piece. Same as pressing the "Reset" button in the UI.

 

<boolean>doesPieceBreak <node>piece

Returns true if the specified piece breaks.

 

See also

MAXScript Extensions for Reactor