Source 2 Animation System VScript API/CModelVScriptCompile.CreateIKControlRig

From Valve Developer Community
Jump to: navigation, search

Function Description

int CModelVScriptCompile::CreateIKControlRig(string type, table parameters)

Creates an Inverse Kinematics rig out of a set of IK chains.

Parameters

Type Name Description
string type Type of the rig. Two types are known, "biped" and "bug".
table parameters IK rig parameters (see below).

Returns

int - Index of the IK rig.

Biped Parameters

When the type is set to "biped", a bipedal leg rig is created, suitable for humans and similar creatures. The parameters are added as keys in the parameters table.

To do: This list is likely incomplete.

Name Type Description
pelvisBoneName string
tiltBone string
maxCenterOfMassDifference unknown
leftFootChain string Name of the left foot IK chain.
rightFootChain string Name of the right foot IK chain.


Bug Parameters

The "bug" type creates a rig for insect legs. The parameters are added as keys in the parameters table.

To do: This list is likely incomplete.

Name Type Description
legs array of strings Names of all the IK chains for the individual legs. To do: Does order matter?
pivot_bone string
pivot_influence float