Source 2 Animation System VScript API/CModelVScriptCompile.CreateIKChain

From Valve Developer Community
< Source 2 Animation System VScript API
Revision as of 04:28, 8 June 2017 by Rectus (talk | contribs) (Created page with "== Function Description == ''' int CModelVScriptCompile::CreateSequence(string ''chainName'', string ''end_bone'', table ''parameters'') ''' Creates an Inverse Kinematics c...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Function Description

int CModelVScriptCompile::CreateSequence(string chainName, string end_bone, table parameters)

Creates an Inverse Kinematics chain, similar to the $ikchain QC command. The function only seems be available in run-time animation vscripts.

Todo: Unknown how much of this works.

Parameters

Type Name Description
string chainName Name to refer to the chain by.
string end_bone The foot in the chain. Needs to have at least two bones higher in the hierarchy.
table parameters IK chain parameters (see below).

Returns

int - Index of the IK chain.

Sequence Parameters

The parameters are added as keys in the parameters table.

Todo: This list is likely wrong and incomplete.
Name Type Description
rules array List of IK rules. Syntax: { { < type = "$" >, ... }, ... }
solverInfo array [Todo] Possible syntax: { < type = ["perlin"|"maya_two_bone"] >, ... }
lockInfo array [Todo] Possible Syntax: { boneInfluenceDriver = "$", reverseFootLockBone = "$"}
bones_point_along_positive_x unknown [Todo]

IK Rules

IK rules in the rules array.

Todo: This list is likely incomplete.
Name Syntax Description
ground { rule = "ground", name = "$", trace_diameter = #, height = # }
touch { rule = "touch", name = "$"}
procedural_target { rule = "procedural_target", name = "$", bone= "$"}