v6.0
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.
CreateCompoundRigidBody( [InputObjs] ); |
Parameter | Type | Description |
---|---|---|
InputObjs | String |
List of objects
we want to be united as a new compound rigid body.
Default Value: Current selection |
' ' 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 |