CreateCompoundRigidBody

Introduced

v6.0

Description

Creates a compound rigid body from the selected objects. The first active rigid body in the selection list (alphabetically sorted) is chosen as the parent, and all other bodies are made into passive rigid bodies (if they are not already) and parented under the active one. If none of the selected objects is an active rigid body, the first (alphabetically) object is made into one, and made the parent of the others.

Scripting Syntax

CreateCompoundRigidBody( [InputObjs] );

Parameters

Parameter Type Description
InputObjs String List of objects we want to be united as a new compound rigid body.

Default Value: Current selection

Examples

VBScript Example

'

' Create two cubes and form a compound rigid body from them

'

set cube1 = CreatePrim("Cube", "MeshSurface" )

SetValue cube1 & ".cube.length", 1

Translate , 2, 0, 0, siAbsolute

set cube2 = CreatePrim("Cube", "MeshSurface")

SetValue cube2 & ".cube.length", 1

Translate , -2, 0, 0, siAbsolute

CreateCompoundRigidBody cube1 &","& cube2

'Results of running this script:

'A new physX environment is created (if there is no current physics environment),

'and the two objects are made into a compound rigid body, with 'cube1' being

'the parent

See Also

CreateActiveRigidBody CreatePassiveRigidBody RemoveRigidBody