CreateCompoundRigidBody

導入

v6.0

詳細

選択されているオブジェクトからコンパウンド リジッド ボディを作成します。選択リスト(アルファベット順に並んでいます)の最初のアクティブ リジッド ボディが親として選択され、その他のボディすべてがパッシブ リジッド ボディになり(まだなっていない場合)、アクティブ リジッド ボディの子になります。 選択されているオブジェクトにアクティブ リジッド ボディがない場合は、(アルファベット順で)最初のオブジェクトがアクティブ リジッド ボディになり、他のボディの親になります。

スクリプト構文

CreateCompoundRigidBody( [InputObjs] );

パラメータ

パラメータ タイプ 説明
InputObjs 文字列 新しいコンパウンド リジッド ボディとして結合させるオブジェクトのリスト

デフォルト値: 現在選択されている値

VBScript の例

'

' 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

関連項目

CreateActiveRigidBody CreatePassiveRigidBody RemoveRigidBody