HumanIK - stingray.HumanIK namespace reference - Stingray Lua API Reference

stingray.HumanIK namespace reference

Description

This object provides access to the HumanIK interface.

Functions

Parameters

context_index :

number

Index of the Character evaluation context you want to set.

constraint_index :

number

Index of the Constraint in the Character evaluation context stack you want to set.

position :

stingray.Vector3

Target position you want to reach.

Returns
This function does not return any values.

It allows you to update the target position for a specific aim Constraint, depending on the context.

Parameters

unit :

stingray.Unit

Unit associated to the Character evaluation context you want to query.

constraint_index :

number

Index of the Constraint you want to query.

target_unit :

stingray.Unit

CHARACTERIZED unit you want to aim at (can be nil to switch to raw position aim).

target_effector :

number

EffectorID of the effector you want to aim at.

Returns
This function does not return any values.

It allows you to update the target unit (and effector) for a specific aim Constraint, depending on the context.

Parameters

unit :

stingray.Unit

Unit you want to associate a context to.

resource_name :

string

name of the .character resource associated to the unit.

Returns
This function does not return any values.

It is not necessary to explicitly declare Character context in most cases. Character contexts are automatically declared and created when an update event happens on the related unit It is only necessary to declare Character contexts when you want to setup IK or retargeting on a character before the first update happens on that Character, especially when using flow (if you do not declare the Context, the plug-in will discard your queries).

Parameters

unit :

stingray.Unit

Unit you want to delete the context.

Returns
This function does not return any values.

Character contexts gets automatically deleted when the world they belong is destroyed. Yet you might want to explicitely delete some character contexts on specific events (like a Unit Unspawn event). It is recommended to delete contexts on Characters you wont operate with HumanIK again for performances reasons. For instance, dead Characters should be deleted.

Parameters
This function does not accept any parameters.
Returns
This function does not return any values.

Useful for understanding/debugging. For all Character evaluation context, this lists all current Constraints and their main settings. Always call that function when you do not understand why a Character does not react properly.

Parameters

unit :

stingray.Unit

Unit you want the HumanIK effector information to get dumped into the log.

Returns
This function does not return any values.

Useful for understanding/debugging.

Parameters

unit :

stingray.Unit

Unit you want the HumanIK information to get dumped into a file.

Returns
This function does not return any values.

Files are: hik_dump.hik: characterization hik_dump.hiks: character state hik_dump.hikes: effector state hik_dump.hikps: propery state)

Parameters

unit :

stingray.Unit

Unit you want to retrieve the Fingers Control constraint "factor" value.

constraint_index :

number

Index of the Constraint you want to query.

factor_id :

number

ID of the Constraint you want set (0: all, 1-5: fingers, 6:lateral spread)

Returns

number

Extension factor (0.0: No extension; 1.0: Full extension).

Parameters

unit :

stingray.Unit

Unit you want to retrieve the Fingers Control constraint "all" value.

constraint_index :

number

Index of the Constraint in the Character evaluation context stack you want to query.

Returns

boolean

true if the Constraint operates on all fingers at the same time.

Parameters

unit :

stingray.Unit

Unit you want to retrieve the Fingers Control constraint "left" value.

constraint_index :

number

Index of the Constraint in the Character evaluation context stack you want to query.

Returns

boolean

true if the Constraint operates on the left hand.

Parameters

unit :

stingray.Unit

Unit you want to set the Fingers Control constraint "all" value.

constraint_index :

number

Index of the Constraint in the Character evaluation context stack you want to set.

all :

number

Set to 1 for the fingers control to operate on all fingers at the same time

Returns
This function does not return any values.

It allows you to chose whether fingers control should operate on all fingers at the same time or not.

Parameters

unit :

stingray.Unit

Unit you want to set the Fingers Control constraint "factor" value.

constraint_index :

number

Index of the Constraint you want to query.

factor_id :

number

ID of the Constraint you want set (0: all, 1-5: fingers, 6:lateral spread)

factor :

number

Extension factor (0.0: No extension; 1.0: Full extension).

Returns
This function does not return any values.
Parameters

unit :

stingray.Unit

Unit you want to set the Fingers Control constraint "left" value.

constraint_index :

number

Index of the Constraint in the Character evaluation context stack you want to set.

left :

number

Set to 1 for the fingers control to operate on the left hand

Returns
This function does not return any values.

It allows you to chose whether the left hand is to be affected or not (or the right hand).

Parameters

unit :

stingray.Unit

Unit you want to retreive the Floor Contact constraint "feet enabled" value.

constraint_index :

number

Index of the Constraint in the Character evaluation context stack you want to query.

Returns

boolean

true if HumanIK feet solving is enabled.

Parameters

unit :

stingray.Unit

Unit you want to retreive the Floor Contact constraint "hands enabled" value.

constraint_index :

number

Index of the Constraint in the Character evaluation context stack you want to query.

Returns

boolean

true if HumanIK hands solving is enabled.

Parameters

unit :

stingray.Unit

Unit you want to retreive the Floor Contact constraint "nb rays" value.

constraint_index :

number

Index of the Constraint you want to query.

Returns

number

Number of rays that get cast to scan the ground topology

Parameters

unit :

stingray.Unit

Unit you want to retreive the Floor Contact constraint "ray down length" value.

constraint_index :

number

Index of the Constraint you want to query.

Returns

number

Vertical distance downwards (from the ankle/wrists effectors) for the rayacst ray end position.

Parameters

unit :

stingray.Unit

Unit you want to retreive the Floor Contact constraint "ray up length" value.

constraint_index :

number

Index of the Constraint you want to query.

Returns

number

Vertical distance upwards (from the ankle/wrists effectors) for the raycast ray start position.

Parameters

unit :

stingray.Unit

Unit you want to retreive the Floor Contact constraint "hands enabled" value.

constraint_index :

number

Index of the Constraint you want to query.

Returns

number

Smoothing intensity for the constraint

Parameters

unit :

stingray.Unit

Unit you want to set the Floor Contact constraint "feet enabled" value.

constraint_index :

number

Index of the Constraint in the Character evaluation context stack you want to set.

enable_feet :

boolean

Set to true to enable feet floor contact.

Returns
This function does not return any values.

It allows you to set whether feet floor contact should be enabled on a specific floor contact. Constraint or not, depending on the context.

Parameters

unit :

stingray.Unit

Unit you want to set the Floor Contact constraint "feet enabled" value.

constraint_index :

number

Index of the Constraint in the Character evaluation context stack you want to set.

enable_hands :

boolean

Set to true to enable hands floor contact.

Returns
This function does not return any values.

It allows you to set whether hands floor contact should be enabled on a specific floor contact. Constraint or not, depending on the context.

Parameters

unit :

stingray.Unit

Unit you want to set the Floor Contact constraint "nb rays" value.

constraint_index :

number

Index of the Constraint you want to tune.

nb_rays :

number

Number of rays that get cast to scan the ground topology (1 is minimum; 9 is a generous value)

Returns
This function does not return any values.
Parameters

unit :

stingray.Unit

Unit you want to set the Floor Contact constraint "ray down length" value.

constraint_index :

number

Index of the Constraint you want to tune.

ray_down_length :

number

Vertical distance downwards (from the ankle/wrists effectors) for the raycast ray start position.

Returns
This function does not return any values.
Parameters

unit :

stingray.Unit

Unit you want to set the Floor Contact constraint "ray up length" value.

constraint_index :

number

Index of the Constraint you want to tune.

ray_up_length :

number

Vertical distance upwards (from the ankle/wrists effectors) for the raycast ray start position.

Returns
This function does not return any values.
Parameters

unit :

stingray.Unit

Unit you want to set the Floor Contact constraint "smoothing" value.

constraint_index :

number

Index of the Constraint you want to tune.

smoothing :

number

Smoothing intensity for adjustments (0.0 means no smoothing at all)

Returns
This function does not return any values.
Parameters

unit :

stingray.Unit

Unit associated with the evaluation constraint whose index you need to retrieve.

constraint_id :

number

ID of the Constraint you are looking after.

Returns

number

Index of the Constraint in the IK Constraint stack of the Character evaluation context (-1 when not found).

Parameters

context_index :

number

Index of the Character evaluation context you want to query.

constraint_index :

number

Index of the Constraint you want to query.

Returns

number

Constraint type (see valued in main "HumanIK.lua" file).

Parameters

context_index :

number

Index of the Character evaluation context you want to query.

Returns

string

A debug name for for the context.

Parameters

unit :

stingray.Unit

Unit you want to retrieve information from.

Returns

boolean

true if the FK rig has to be drawn in the editor viewports.

boolean

true if the IK rig has to be drawn in the editor viewports.

boolean

true if rigs should always be drawn, even when the unit is not selected.

Parameters

unit :

stingray.Unit

Unit you want to query for an effector transforms.

effector_id :

number

Effector ID of the Effector you want to read the transformation.

Returns

stingray.Vector3

The Position of the Effector.

stingray.Quaternion

The Orientation of the Effector.

Parameters

unit :

stingray.Unit

Unit you want to query.

line_index :

number

Index of the line you want to query.

Returns

stingray.Vector3

End point 1 position for the line (in world coordinates).

stingray.Vector3

End point 2 position for the line (in world coordinates).

Parameters

unit :

stingray.Unit

Unit you want to query.

marker_index :

number

Index of the marker you want to query.

Returns

stingray.Vector3

Position of the marker (in world coordinates).

Parameters

unit :

stingray.Unit

Unit you want to query.

node_id :

number

ID of the node/joint to query.

Returns

number

The number of children nodes/joints for the specified node/joint.

Parameters

unit :

stingray.Unit

Unit you want to query.

node_id :

number

ID of the node/joint to query.

child_index :

number

Index of child node/joint to query.

Returns

number

Index of the child node.

Parameters

context_index :

number

Index of the Character evaluation context you want to query.

node_id :

number

ID of the node/joint to query.

Returns

number

Index of the parent node.

Parameters

context_index :

number

Index of the Character evaluation context you want to query.

node_id :

number

Node ID of the Node you want to read the position.

fk :

boolean

FK position when true, IK position when false

Returns

stingray.Vector3

The Position of the Node.

Parameters

unit :

stingray.Unit

Unit you want to query.

node_id :

number

ID of the node/bone you want to read the transformation.

fk :

number

Set to 0 to query the IK position; Set to 1 to query the FK position.

Returns

stingray.Vector3

The Position of the node/bone.

stingray.Quaternion

The Orientation of the node/bone.

Returns the FK position when fk is set to 1. Returns the IK position when fk is set to 0.

Parameters

unit :

stingray.Unit

Unit you want to retrieve information from.

Returns

boolean

true if IK solve is disabled for that context.

boolean

true if FK update is disabled for that context.

Parameters

unit :

stingray.Unit

Unit you would like to retreive the retargeting source.

Returns

number

Index of the Character evaluation context used as source for retargeting (-1 if none).

Parameters

unit :

stingray.Unit

Unit you want to retrieve the Look At constraint "chest contribution" value.

constraint_index :

number

Index of the Constraint you want to query.

Returns

number

Chest contribution factor (between 0.0 and 1.0) for the specified look at behavior.

Parameters

unit :

stingray.Unit

Unit you want to retrieve the Look At constraint "xy only" value.

constraint_index :

number

Index of the Constraint you want to query.

Returns

boolean

true if look at Constraint only operates on the horizontal (XY) plan.

Parameters

unit :

stingray.Unit

Unit you want to set the Look At constraint "chest contribution" value.

constraint_index :

number

Index of the Constraint you want to query.

chest_contribution :

number

Defines how much the chest can contribute to the target tracking (0.0: No contribution; 1.0: Full contribution).

Returns
This function does not return any values.
Parameters

unit :

stingray.Unit

Unit you want to set the Look At constraint "target position" value.

constraint_index :

number

Index of the Constraint you want to query.

target_position :

stingray.Vector3

Actual global position to look at.

Returns
This function does not return any values.

It allows you to update the target position for a specific look at Constraint, depending on the context.

Parameters

unit :

stingray.Unit

Unit you want to set the Look At constraint "target unit" value.

constraint_index :

number

Index of the Constraint you want to query.

target_unit :

stingray.Unit

CHARACTERIZED unit you want to look at (can be nil to switch to raw position look at).

target_effector :

number

EffectorID of the effector you want to look at.

Returns
This function does not return any values.

It allows you to update the target unit (and effector) for a specific look at Constraint, depending on the context.

Parameters

unit :

stingray.Unit

Unit you want to set the Look At constraint "xy only" value.

constraint_index :

number

Index of the Constraint you want to set.

restrain_to_xy_plan :

boolean

Restrain the head (and chest) motion to the XY plan.

Returns
This function does not return any values.
Parameters

unit :

stingray.Unit

Unit you want to query.

node_id :

number

Node ID of the Node you want to query.

Returns

stingray.Vector3

The minimum limits (X, Y, Z) in euler/radians for the Node.

stingray.Vector3

The maximum limits (X, Y, Z) in euler/radians for the Node.

stingray.Quaternion

The pre-rotation for the Node.

Parameters

unit :

stingray.Unit

Unit you want to query.

node_id :

number

Node ID of the Node you want to query.

Returns

number

The number of lines to draw for limits.

Parameters

unit :

stingray.Unit

Unit you want to query.

element_index :

number

Index of the element to get.

Returns

stingray.Vector3

The first end point position (absolute position).

stingray.Vector3

The second end point position (absolute position).

number

Red component of the element

number

Green component of the element

number

Blue component of the element

Parameters

unit :

stingray.Unit

Unit you want to query.

node_id :

number

Node ID of the Node you want to query.

Returns

boolean

true if the Node is equiped with limits.

Parameters

unit :

stingray.Unit

Unit you want to query.

Returns

number

Number of Constraints currently in the stack for that context.

Parameters

unit :

stingray.Unit

Unit you want to query.

Returns

number

Number of lines associated to that context.

Lines are mostly used for debugging purposes to display key positions during IK computations. A line pointing from a Character head to another Character head might. get generated by the look at Constraint, for instance.

Parameters

unit :

stingray.Unit

Unit you want to query.

Returns

number

Number of markers associated to that context.

Markers are mostly used for debugging purposes to display key positions during IK computation. A ray cast collision point computed during floor contact computation might generate a marker, for instance.

Parameters

unit :

stingray.Unit

Unit you want to retreive the Offset Position constraint "effector" value.

constraint_index :

number

Index of the Constraint in the Character evaluation context stack you want to query.

Returns

number

The Effector ID of the offset rotation Constraint.

Parameters

unit :

stingray.Unit

Unit you want to set the Offset Position constraint "vector" value.

constraint_index :

number

Index of the Constraint in the Character evaluation context stack you want to query.

Returns

stingray.Vector3

The delta vector (displacement) for the offset rotation Constraint.

Parameters

unit :

stingray.Unit

Unit you want to retrieve the Offset Position constraint "world space" value.

constraint_index :

number

Index of the Constraint in the Character evaluation context stack you want to query.

Returns

boolean

true if the Constraint is working in World Space.

Parameters

unit :

stingray.Unit

Unit whose Offset Position constraint "effector" value you want to set.

constraint_index :

number

Index of the Constraint in the Character evaluation context stack you want to set.

effector_id :

number

Effector ID of the effector (Hips, LeftWrist, ...) you want the Constraint to get applied to.

Returns
This function does not return any values.

It allows you to update the effector for a specific offset position Constraint, depending on the context.

Parameters

unit :

stingray.Unit

Unit you want to set the Offset Position constraint "vector" value.

constraint_index :

number

Index of the Constraint in the Character evaluation context stack you want to set.

delta :

stingray.Vector3

Delta vector (displacement) for the position offset you want to apply.

Returns
This function does not return any values.

It allows you to update the delta vector for a specific offset position Constraint, depending on the context.

Parameters

unit :

stingray.Unit

Unit you want to set the Offset Position constraint "world space" value.

constraint_index :

number

Index of the Constraint in the Character evaluation context stack you want to set.

world_space :

number

Set to 1 to work in World Space, otherwise reference pose is the latest evaluated pose (in local coordinates)

Returns
This function does not return any values.

It allows you to update the space (World Space/Local Space (latest evaluated pose)) for a specific offset position Constraint, depending on the context.

Parameters

unit :

stingray.Unit

Unit you want to retreive the Offset Rotation constraint "angle" value.

constraint_index :

number

Index of the Constraint in the Character evaluation context stack you want to query.

Returns

number

The angle, in degrees, of the offset rotation Constraint.

Parameters

unit :

stingray.Unit

Unit you want to retreive the Offset Rotation constraint "axis" value.

constraint_index :

number

Index of the Constraint in the Character evaluation context stack you want to query.

Returns

stingray.Vector3

The axis of the Offset Rotation Constraint.

Parameters

unit :

stingray.Unit

Unit you want to retreive the Offset Rotation constraint "effector" value.

constraint_index :

number

Index of the Constraint in the Character evaluation context stack you want to query.

Returns

number

The Effector ID of the Offset Rotation Constraint.

Parameters

unit :

stingray.Unit

Unit you want to retreive the Offset Rotation constraint "is world space" value.

constraint_index :

number

Index of the Constraint in the Character evaluation context stack you want to query.

Returns

boolean

true if the Constraint is working in World Space.

Parameters

unit :

stingray.Unit

Unit you want to set the Offset Rotation constraint "angle" value.

constraint_index :

number

Index of the Constraint in the Character evaluation context stack you want to set.

angle :

number

Angle (in degrees) for the rotation offset you want to apply.

Returns
This function does not return any values.

It allows you to update the angle of a specific offset rotation Constraint, depending on the context.

Parameters

unit :

stingray.Unit

Unit you want to set the Offset Rotation constraint "axis" value.

constraint_index :

number

Index of the Constraint in the Character evaluation context stack you want to set.

axis :

stingray.Vector3

Axis of the rotation offset you want to apply.

Returns
This function does not return any values.

It allows you to update the axis of rotation for a specific offset rotation Constraint, depending on the context.

Parameters

unit :

stingray.Unit

Unit you want to set the Offset Rotation constraint "effector" value.

constraint_index :

number

Index of the Constraint in the Character evaluation context stack you want to set.

effector :

number

Effector ID of the effector (Hips, LeftWrist, ...) you want the Constraint to get applied to.

Returns
This function does not return any values.

It allows you to update the effector of a specific offset rotation Constraint, depending on the context.

Parameters

unit :

stingray.Unit

Unit you want to set the Offset Rotation constraint "world space" value.

constraint_index :

number

Index of the Constraint in the Character evaluation context stack you want to set.

world_space :

number

Set to 1 to work in World Space, otherwise reference pose is the latest evaluated pose (in local coordinates)

Returns
This function does not return any values.

It allows you to update the space (World Space/Local Space (latest evaluated pose)) for a specific offset rotation Constraint, depending on the context.

Parameters

unit :

stingray.Unit

Unit you want to retrieve the Pin constraint "effector" value.

constraint_index :

number

Index of the Constraint in the Character evaluation context stack you want to query.

Returns

number

The Effector ID of the pin Constraint.

Parameters

unit :

stingray.Unit

Unit you want to retrieve the Pin constraint "world space" value.

constraint_index :

number

Index of the Constraint in the Character evaluation context stack you want to query.

Returns

boolean

true if the Constraint is working in World Space.

Parameters

unit :

stingray.Unit

Unit whose Pin constraint "effector" value you want to set.

constraint_index :

number

Index of the Constraint in the Character evaluation context stack you want to set.

effector_id :

number

Effector ID of the effector (Hips, LeftWrist, ...) you want the Constraint to get applied to.

Returns
This function does not return any values.

It allows you to update the effector for a specific pin Constraint, depending on the context.

Parameters

unit :

stingray.Unit

Unit you want to set the Pin constraint "world space" value.

constraint_index :

number

Index of the Constraint in the Character evaluation context stack you want to set.

world_space :

number

Set to 1 to work in World Space, otherwise reference pose is the latest evaluated pose (in local coordinates)

Returns
This function does not return any values.

It allows you to update the space (World Space/Local Space (latest evaluated pose)) for a specific pin Constraint, depending on the context.

Parameters

unit :

stingray.Unit

Unit you want to retreive the Plant constraint "depth" value.

constraint_index :

number

Index of the Constraint you want to query.

Returns

number

The planting depth for the constraint

Parameters

unit :

stingray.Unit

Unit you want to retreive the Plant constraint "feet enabled" value.

constraint_index :

number

Index of the Constraint you want to query.

Returns

boolean

true if planting is enabled on feet

Parameters

unit :

stingray.Unit

Unit you want to retreive the Plant constraint "feet enabled" value.

constraint_index :

number

Index of the Constraint you want to query.

Returns

boolean

true if planting is enabled on hands

Parameters

unit :

stingray.Unit

Unit you want to retreive the Plant constraint "nb rays" value.

constraint_index :

number

Index of the Constraint you want to query.

Returns

number

Number of rays that get cast to scan the ground topology

Parameters

unit :

stingray.Unit

Unit you want to retreive the Plant constraint "ray down length" value.

constraint_index :

number

Index of the Constraint you want to query.

Returns

number

Vertical distance downwards (from the ankle/wrists effectors) for the rayacst ray end position.

Parameters

unit :

stingray.Unit

Unit you want to retreive the Plant constraint "ray up length" value.

constraint_index :

number

Index of the Constraint you want to query.

Returns

number

Vertical distance upwards (from the ankle/wrists effectors) for the raycast ray start position.

Parameters

unit :

stingray.Unit

Unit you want to retreive the Plant constraint "smoothing" value.

constraint_index :

number

Index of the Constraint you want to query.

Returns

number

Smoothing intensity for the constraint

Parameters

unit :

stingray.Unit

Unit you want to retreive the Plant constraint "is relative" value.

constraint_index :

number

Index of the Constraint you want to query.

Returns

boolean

true if planting works in relative mode

Parameters

unit :

stingray.Unit

Unit you want to set the Plant constraint "depth" value.

constraint_index :

number

Index of the Constraint you want to tune.

depth :

number

Planting depth (0.0 means exactly on floor surface; 0.03 is usually a good value).

Returns
This function does not return any values.
Parameters

unit :

stingray.Unit

Unit you want to set the Plant constraint "feet enabled" value.

constraint_index :

number

Index of the Constraint you want to tune.

feet :

boolean

Set to true to enable feet planting

Returns
This function does not return any values.
Parameters

unit :

stingray.Unit

Unit you want to set the Plant constraint "hands enabled" value.

constraint_index :

number

Index of the Constraint you want to tune.

hands :

boolean

Set to true to enable hands planting (mostly for quadrupeds)

Returns
This function does not return any values.
Parameters

unit :

stingray.Unit

Unit you want to set the Plant constraint "nb rays" value.

constraint_index :

number

Index of the Constraint you want to tune.

nb_rays :

number

Number of rays that get cast to scan the ground topology (1 is minimum; 9 is a generous value)

Returns
This function does not return any values.
Parameters

unit :

stingray.Unit

Unit you want to set the Plant constraint "ray down length" value.

constraint_index :

number

Index of the Constraint you want to tune.

ray_down_length :

number

Vertical distance downwards (from the ankle/wrists effectors) for the rayacst ray end position

Returns
This function does not return any values.
Parameters

unit :

stingray.Unit

Unit you want to set the Plant constraint "ray up length" value.

constraint_index :

number

Index of the Constraint you want to tune.

ray_up_length :

number

Vertical distance upwards (from the ankle/wrists effectors) for the raycast ray start position.

Returns
This function does not return any values.
Parameters

unit :

stingray.Unit

Unit you want to set the Plant constraint "relative" value.

constraint_index :

number

Index of the Constraint you want to tune.

hands :

boolean

Set to true to enable relative mode (preserve FK altitude)

Returns
This function does not return any values.
Parameters

unit :

stingray.Unit

Unit you want to set the Plant constraint "smoothing" value.

constraint_index :

number

Index of the Constraint you want to tune.

smoothing :

number

Smoothing intensity for adjustments (0.0 means no smoothing at all)

Returns
This function does not return any values.
Parameters

unit :

stingray.Unit

Unit you want the Character evaluation context to be poped by one constraint.

Returns
This function does not return any values.
Parameters

unit :

stingray.Unit

Unit you want the Character evaluation context to be cleared.

Returns
This function does not return any values.

After that call, the IK Constraints stack for that Character will be empty.

Parameters

unit :

stingray.Unit

Unit you want to push the Aim constraint on.

attachment_effectorID :

number

ID of the effector where the weapon is attached.

hips_contribution :

number

Hips contribution factor to the aiming effort (between 0.0 and 1.0)

chest_contribution :

number

Chest contribution factor to the aiming effort (between 0.0 and 1.0)

shoulder_contribution :

number

Shoulder contribution factor to the aiming effort (between 0.0 and 1.0)

elbow_contribution :

number

Elbow contribution factor to the aiming effort (between 0.0 and 1.0)

reference_target_bone :

number

The unit reference target bone object node index.

pin_other_hand :

boolean

Pin other hand (the one the weapon is not parented to) to its relative position to the gun (for 2 handed weapons, when pivot is not chest or hips)

target_unit :

number

CHARACTERIZED unit you want to aim at (set to nil for target position aim at).

target_effector :

number

EffectorID of the target unit to aim at (can be -1 when aiming at a target position)

target_position :

stingray.Vector3

Actual target position (when aim_at_position is true)

aim_at_position :

boolean

Set to true to aim target position, set to false to aim at target unit

max_angular_speed :

number

Maximal angular speed for the tracking vector (degrees per second).

contact :

boolean

Set to true when dealing with contact weapons (or no punching)

alpha :

number

Alpha value (strength/intensity) of the Constraint (between 0.0 and 1.0).

blend_in_time :

number

Time (in seconds) for the Constraint to become fully active (to reach its alpha value).

constraint_id :

number

Constraint ID for later retrieving and tuning the Constraint (can be -1 if no tracking is required).

Returns
This function does not return any values.

An aim Constraints reorients a character part (usually an elbow, a shoulder, a chest or the hips) to point to an aiming target Several aiming Constraints can be simultaneously active on a character to distribute the aiming effort over several body parts (with different alpha values)

Parameters

unit :

stingray.Unit

Unit you want to push the Fingers Control constraint on.

all :

number

Set to 1 for the fingers control to operate on all fingers at the same time.

left :

number

Set to 1 for the fingers control to operate on the left hand.

hand_factor :

number

Extension factor for the whole hand (0.0: No extension; 1.0: Full extension).

factor_1 :

number

Extension factor for the finger 1 (0.0: No extension; 1.0: Full extension).

factor_2 :

number

Extension factor for the finger 2 (0.0: No extension; 1.0: Full extension).

factor_3 :

number

Extension factor for the finger 3 (0.0: No extension; 1.0: Full extension).

factor_4 :

number

Extension factor for the finger 4 (0.0: No extension; 1.0: Full extension).

factor_5 :

number

Extension factor for the finger 5 (0.0: No extension; 1.0: Full extension).

spread :

number

Lateral spread factor (0.0: Not spread; 1.0: Full spread).

alpha :

number

Alpha value (strength/intensity) of the Constraint (between 0.0 and 1.0).

blend_in_time :

number

Time (in seconds) for the Constraint to become fully active (to reach its alpha value).

constraint_id :

number

Constraint ID for later retrieving and tuning the Constraint (can be -1 if no tracking is required).

Returns
This function does not return any values.
Parameters

unit :

stingray.Unit

Unit you want to push the floor constraint on.

enable_feet :

boolean

Set to true to enable feet floor contact.

enable_hands :

boolean

Set to true to enable hands floor contact.

constraint_id :

number

Constraint ID for later retrieving and tuning the Constraint (can be -1 if no tracking is required)

smoothing :

number

Smoothing intensity to avoid sharp adjustments (0.0 means disable)

nb_rays :

number

Number of rays to cast to scan terrain position and normal (1 is minimum; 9 is a generous value)

ray_up_length :

number

Vertical distance upwards (from the ankle/wrists effectors) for the raycast ray start position

ray_down_length :

number

Vertical distance downwards (from the ankle/wrists effectors) for the rayacst ray end position

Returns
This function does not return any values.

The floor contact Constraint only affects legs and arms and does not affect hips nor chest. The purpose of this Constraint is to avoid feet and hands penetration inside the terrain geometry. If you also want to update hips and/or chest, you can call the plant Constraint first.

Parameters

unit :

stingray.Unit

Unit you want to push the Invert constraint on.

limb_name :

string

Name of the limb you want to invert (Accepted values are: "Left Leg", "Right Leg", "Left Arm", "Right Arm").

Returns
This function does not return any values.

The 'invert' Constraint enables a Character limb to bend in the opposite direction you would expect (like a knee bending frontward). This is useful when dealing with special bipeds where this is the expected behavior like chickens.

Parameters

unit :

stingray.Unit

Unit you want to push the LOD constraint on.

low_definition_retarget :

boolean

Use low definition retarget (true) or full precision retarget (false).

low_definition_solve :

boolean

Use low definition solver (true) or full precision solver (false).

Returns
This function does not return any values.

The LOD solver (low definition solver) operates 10x faster than the full precision solver. In many situations, the results are fair enough for characters standing far from the camera. It is totally legitimate to use both the low definition and the high definition solver during a multipass solve.

Parameters

unit :

stingray.Unit

Unit you want to push the Look At constraint on.

target_unit :

number

CHARACTERIZED unit you want to aim at (can be nil when look_at_position is set to true).

target_effector :

number

Effector ID of the target effector you want to look at (can be -1 when look_at_position is set to false).

target_position :

stingray.Vector3

Actual target position (when look_at_position is true)

look_at_position :

boolean

Set to true to look at target position, set to false to look at target unit.

restrain_to_xy_plan :

boolean

Restrain the head (and chest) motion to the XY plan.

chest_contribution :

number

Defines how much the chest can contribute to the target tracking (0.0: No contribution; 1.0: Full contribution).

max_angular_speed :

number

Maximal angular speed for the tracking vector (degrees per second).

enable_limits :

boolean

Set to true to enable FOV limits.

max_horizontal_angle :

number

Maximal horizontal angle (60 means: you can turn the head up to 60 degrees left and 60 degrees right).

max_vertical_angle :

number

Maximal vertical angle (30 means: you can turn the head up to 30 degrees up and 30 degrees down).

alpha :

number

Alpha value (strength/intensity) of the Constraint (between 0.0 and 1.0).

blend_in_time :

number

Time (in seconds) for the Constraint to become fully active (to reach its alpha value).

constraint_id :

number

Constraint ID for later retrieving and tuning the Constraint (can be -1 if no tracking is required).

Returns
This function does not return any values.

A 'look at' Constraint enables a Character to look at another Character.

Parameters

unit :

stingray.Unit

Unit you want to push the Offset Position constraint on.

effector_id :

number

Effector ID of the effector (Hips, LeftWrist, ...) you want the Constraint to get applied to.

delta :

stingray.Vector3

Delta vector (displacement) for the position offset you want to apply.

world_space :

number

Set to 1 to work in World Space, otherwise reference pose is the latest evaluated pose (in local coordinates)

alpha :

number

Alpha value (strength/intensity) of the Constraint (between 0.0 and 1.0).

blend_in_time :

number

Time (in seconds) for the Constraint to become fully active (to reach its alpha value).

constraint_id :

number

Constraint ID for later retrieving and tuning the Constraint (can be -1 if no tracking is required).

Returns
This function does not return any values.

The 'offset position' Constraint enables you to set a position offset for a specific effector to get applied. The position offset can either be expressed in world space or in local space (latest evaluated pose) depending on the world_space value.

Parameters

unit :

stingray.Unit

Unit you want to push the Offset Rotation constraint on.

effector_id :

number

Effector ID of the effector (Hips, LeftWrist, ...) you want the Constraint to get applied to.

axis :

stingray.Vector3

Axis of for the rotation offset you want to apply.

angle :

number

Angle (in degrees) for the rotation offset you want to apply.

world_space :

number

Set to 1 to work in World Space, otherwise reference pose is the latest evaluated pose (in local coordinates)

alpha :

number

Alpha value (strength/intensity) of the Constraint (between 0.0 and 1.0).

blend_in_time :

number

Time (in seconds) for the Constraint to become fully active (to reach its alpha value).

constraint_id :

number

Constraint ID for later retrieving and tuning the Constraint (can be -1 if no tracking is required).

Returns
This function does not return any values.

The 'offset rotation' Constraint enables you to set a rotation offset for a specific effector to get applied. The rotation offset can either be expressed in world space or in local space (latest evaluated pose) depending on the world_space value.

Parameters

unit :

stingray.Unit

Unit you want to push the LOD constraint on.

solve_left_arm :

boolean

Solve or do not solve the left arm.

solve_right_arm :

boolean

Solve or do not solve the right arm.

solve_left_leg :

boolean

Solve or do not solve the left leg.

solve_right_leg :

boolean

Solve or do not solve the right leg.

solve_left_shoulder :

boolean

Solve or do not solve the left shoulder.

solve_right_shoulder :

boolean

Solve or do not solve the right shoulder.

solve_left_hand :

boolean

Solve or do not solve the left hand.

solve_right_hand :

boolean

Solve or do not solve the right hand.

solve_left_foot :

boolean

Solve or do not solve the left foot.

solve_right_foot :

boolean

Solve or do not solve the right foot.

solve_head :

boolean

Solve or do not solve the head.

solve_spine :

boolean

Solve or do not solve the spine.

Returns
This function does not return any values.

By default, all body parts are solved on a character. Insert this constraint in the IK constraint stack to limit the solving to certain body parts. It is correct to insert several Partial Solving Settings Constraint in the IK constraints stack when implementing multipass solve. (Note the solved parts are automatically reset to "all" after each call to a Solve Constraint).

Parameters

unit :

stingray.Unit

Unit you want to push the Pin constraint on.

effector_id :

number

Effector ID of the effector (Hips, LeftWrist, ...) you want the Constraint to get applied to.

world_space :

number

Set to 1 to work in World Space, Set to 0 to work in Character Space.

alpha :

number

Alpha value (strength/intensity) of the Constraint (between 0.0 and 1.0).

blend_in_time :

number

Time (in seconds) for the Constraint to become fully active (to reach its alpha value).

constraint_id :

number

Constraint ID for later retrieving and tuning the Constraint (can be -1 if no tracking is required).

Returns
This function does not return any values.

A 'pin' Constraint is an easy way to lock an effector to its initial position (either in World Space or Character Space).

Parameters

unit :

stingray.Unit

Unit you want to push the plant constraint on.

enable_feet :

boolean

Set to true to enable feet floor planting.

enable_hands :

boolean

Set to true to enable hands floor planting.

constraint_id :

number

Constraint ID for later retrieving and tuning the Constraint (can be -1 if no tracking is required).

nb_rays :

number

Number of rays to cast to scan terrain position and normal (1 is minimum; 9 is a generous value)

ray_up_length :

number

Vertical distance upwards (from the ankle/wrists effectors) for the raycast ray start position

ray_down_length :

number

Vertical distance downwards (from the ankle/wrists effectors) for the rayacst ray end position

relative :

boolean

Set to true to enable relative floor planting (preserve FK altitude for ankles and hips).

smoothing :

number

Smoothing intensity (0.0 means no smoothing 1.5 is usually a good value).

depth :

number

Planting depth (0.0 means exactly on floor surface; 0.03 is usually a good value).

affect_chest_rotation :

number

How much (between 0.0 and 1.0) the chest rotation can be affected by this node (0.05 is usually a good value)

affect_hips_rotation :

number

How much (between 0.0 and 1.0) the hips rotation can be affected by this node (0.2 is usually a good value)

Returns
This function does not return any values.

The purpose of this Constraint is to plant feet and hands inside the terrain geometry. In order to do this, the Constraint can move the Character hips, mostly vertically. Usually, a floor contact Constraint gets pushed on the stack imediately after the plant Constraint.

Parameters

unit :

stingray.Unit

Unit you want the Property Value constraint to be pushed on.

property_id :

number

ID of the property to change the value

value :

number

New value for the property

Returns
This function does not return any values.
Parameters

unit :

stingray.Unit

Unit you want to push the Fingers Control constraint on.

effector_id :

number

Effector ID of the effector (Hips, LeftWrist, ...) you want the Constraint to get applied to.

alpha :

number

Alpha value (strength/intensity) of the Constraint (between 0.0 and 1.0).

blend_in_time :

number

Time (in seconds) for the Constraint to become fully active (to reach its alpha value).

constraint_id :

number

Constraint ID for later retrieving and tuning the Constraint (can be -1 if no tracking is required).

Returns
This function does not return any values.

The 'pull' Constraint enables actual full body IK: the possibility for an effector to drag the entiere body to satisfy its Constraints.

Parameters

unit :

stingray.Unit

Unit you want to push the Reach Orientation constraint on.

effector_id :

number

Effector ID of the effector (Hips, LeftWrist, ...) you want the Constraint to get applied to.

euler_orientation :

stingray.Vector3

Target orientation you want to reach (in euler angles).

world_space :

number

Set to 1 to work in World Space, otherwise reference pose is the latest evaluated pose (in local coordinates)

alpha :

number

Alpha value (strength/intensity) of the Constraint (between 0.0 and 1.0).

blend_in_time :

number

Time (in seconds) for the Constraint to become fully active (to reach its alpha value).

constraint_id :

number

Constraint ID for later retrieving and tuning the Constraint (can be -1 if no tracking is required).

Returns
This function does not return any values.

The 'reach orientation' Constraint enables you to set a target orientation for a specific effector to get reached. The target orientation can either be expressed in world space or in local space (latest evaluated pose) depending on the world_space value.

Parameters

unit :

stingray.Unit

Unit you want to push the Reach Position constraint on.

effector_id :

number

Effector ID of the effector (Hips, LeftWrist, ...) you want the Constraint to get applied to.

position :

stingray.Vector3

Target position you want to reach.

world_space :

number

Set to 1 to work in World Space, otherwise reference pose is the latest evaluated pose (in local coordinates)

alpha :

number

Alpha value (strength/intensity) of the Constraint (between 0.0 and 1.0).

blend_in_time :

number

Time (in seconds) for the Constraint to become fully active (to reach its alpha value).

constraint_id :

number

Constraint ID for later retrieving and tuning the Constraint (can be -1 if no tracking is required).

Returns
This function does not return any values.

The 'reach position' Constraint enables you to set a target position for a specific effector to get reached. The target position can either be expressed in world space or in local space (latest evaluated pose) depending on the world_space value.

Parameters

unit :

stingray.Unit

Unit you want to push the Relative Pin constraint on.

effector_id :

number

Effector ID of the effector (Hips, LeftWrist, ...) you want the Constraint to get applied to.

pin_to_unit :

stingray.Unit

The unit to use for relative pinning.

pin_to_unit_object :

number

The unit object node index.

translation :

number

Translation factor (between 0.0 and 1.0) (set to 1.0 by default)

rotation :

number

Rotation factor (between 0.0 and 1.0) (set to 1.0 by default)

pull :

number

Pull factor (between 0.0 and 1.0).

alpha :

number

Alpha value (strength/intensity) of the Constraint (between 0.0 and 1.0).

blend_in_time :

number

Time (in seconds) for the Constraint to become fully active (to reach its alpha value).

constraint_id :

number

Constraint ID for later retrieving and tuning the Constraint (can be -1 if no tracking is required).

Returns
This function does not return any values.

A relative pin Constraint pins an effector to an external unit (so when this external unit moves or rotates, the effector will track its movements)

Parameters

unit :

stingray.Unit

Unit you want to push the Resist constraint on.

effector_id :

number

Effector ID of the effector (Hips, LeftWrist, ...) you want the Constraint to get applied to.

alpha :

number

Alpha value (strength/intensity) of the Constraint (between 0.0 and 1.0).

blend_in_time :

number

Time (in seconds) for the Constraint to become fully active (to reach its alpha value).

constraint_id :

number

Constraint ID for later retrieving and tuning the Constraint (can be -1 if no tracking is required).

Returns
This function does not return any values.

The 'resist' Constraint is only effective in full body IK; it indicates how much an effector should try to preserve its original FK orientation.

Parameters

unit :

stingray.Unit

Unit you want the solve constraint to be pushed on.

Returns
This function does not return any values.

In some cases, though, it might be useful to solve the Character several times during the same frame. This solve request enables multi-pass solving and can be inserted anywhere in the IK Constraint stack.

Parameters

unit :

stingray.Unit

Unit you want the Test Biped constraint to be applied to.

alpha :

number

Alpha value (strength/intensity) of the Constraint (between 0.0 and 1.0).

blend_in_time :

number

Time (in seconds) for the Constraint to become fully active (to reach its alpha value).

constraint_id :

number

Constraint ID for later retrieving and tuning the Constraint (can be -1 if no tracking is required).

Returns
This function does not return any values.

The 'test biped' Constraint is an easy way to check a biped skeletal unit can properly be manipulated by HumanIK. When pushing this Constraint on a biped unit, you should see it starting to move its hips, chest and wrist to follow test motions.

Parameters

unit :

stingray.Unit

Unit you want the Test Quadruped constraint to be applied to.

Returns
This function does not return any values.

The 'test quadruped' Constraint is a easy way to check a quadruped skeletal unit can properly be manipulated by HumanIK. When pushing this Constraint on a quadruped unit, you should see it starting to move its hips and chest while keeping its feet planted on the ground.

Parameters

unit :

stingray.Unit

Unit you want to set the Reach Orientation constraint "orientation" value.

constraint_index :

number

Index of the Constraint in the Character evaluation context stack you want to set.

euler_orientation :

stingray.Vector3

Target orientation you want to reach (in euler angles).

Returns
This function does not return any values.

It allows you to update the target orientation for a specific reach orientation Constraint, depending on the context.

Parameters

unit :

stingray.Unit

Unit you want to set the Reach Position constraint "position" value.

constraint_index :

number

Index of the Constraint in the Character evaluation context stack you want to set.

position :

stingray.Vector3

Target position you want to reach.

Returns
This function does not return any values.

It allows you to update the target position for a specific reach position Constraint, depending on the context.

Parameters

context_index :

number

Index of the Character evaluation context you want to set.

constraint_index :

number

Index of the Constraint in the Character evaluation context stack you want to set.

Returns
This function does not return any values.

At refresh time, the Constraints compute and store a relative transform between the effector (in its FK state) and the external unit; the Constraint will preserve this relative transform during the next frames.

Parameters

unit :

stingray.Unit

Unit associated to the evaluation context to modify.

constraint_index :

number

Index of the Constraint to set the alpha to.

alpha :

number

Alpha value (intensity) for that Constraint (between 0.0 and 1.0).

Returns
This function does not return any values.

The alpha value indicated the strength/intensity of a Constraint. When alpha is set to 0.0, the Constraint has no visible effect. When alpha is set to 1.0, the Constraint is fully active.

Parameters

unit :

stingray.Unit

Unit you want to affect.

draw_fk :

boolean

Set to true to draw the FK rig in the editor viewports.

draw_ik :

boolean

Set to true to draw the IK rig in the editor viewports.

draw_always :

boolean

Set to true to always draw the rigs in the editor viewports, even when the unit is not selected.

Returns
This function does not return any values.
Parameters

unit :

stingray.Unit

Unit you want to affect.

disable_ik :

boolean

Set to true to disable IK solve.

disable_fk :

boolean

Set to true to disable FK update.

Returns
This function does not return any values.
Parameters

target_unit :

stingray.Unit

Unit associated to the evaluation context to retarget to.

source_unit :

stingray.Unit

Unit associated to the evaluation context to retarget from.

Returns
This function does not return any values.

To disable retargeting, you can set the value of source_context_index to -1

Parameters

context_index :

number

Index of the Creature evaluation context you want to query.

chain_index :

number

Index of the Chain you want to query the name.

Returns

string

A debug name for for the context.

Parameters

context_index :

number

Index of the Creature evaluation context you want to query.

constraint_index :

number

Index of the Constraint you want to query.

Returns

number

Amplitude of the motion for the specified Chain Motion Constraint.

Parameters

context_index :

number

Index of the Creature evaluation context you want to query.

constraint_index :

number

Index of the Constraint you want to query.

Returns

number

Index of the Chain for the specified Chain Motion Constraint.

Parameters

context_index :

number

Index of the Creature evaluation context you want to query.

constraint_index :

number

Index of the Constraint you want to query.

Returns

number

Frequency (in Hz) of the motion for the specified Chain Motion Constraint.

Parameters

context_index :

number

Index of the Creature evaluation context you want to query.

constraint_index :

number

Index of the Constraint you want to query.

Returns

number

Phase (in seconds) of the motion for the specified Chain Motion Constraint.

Parameters

context_index :

number

Index of the Creature evaluation context you want to query.

constraint_index :

number

Index of the Constraint you want to query.

Returns

number

Pull strength (between 0.0 anf 1.0) of the motion for the specified Chain Motion Constraint.

Parameters

context_index :

number

Index of the Creature evaluation context you want to query.

constraint_index :

number

Index of the Constraint you want to query.

Returns

number

Orientation reach blending factor (between 0.0 anf 1.0) of the motion for the specified Chain Motion Constraint.

Parameters

context_index :

number

Index of the Creature evaluation context you want to query.

constraint_index :

number

Index of the Constraint you want to query.

Returns

number

Translation reach blending factor (between 0.0 anf 1.0) of the motion for the specified Chain Motion Constraint.

Parameters

context_index :

number

Index of the Creature evaluation context you want to query.

constraint_index :

number

Index of the Constraint you want to query.

Returns

number

Type of the motion for the specified Chain Motion Constraint.

Parameters

context_index :

number

Index of the Creature evaluation context you want to set.

constraint_index :

number

Index of the Constraint in the Creature evaluation context stack you want to set.

amplitude :

number

Amplitude of the motion to be applied

Returns
This function does not return any values.

It allows you to update the motion amplitude for a specific Chain Motion Constraint, depending on the context.

Parameters

context_index :

number

Index of the Creature evaluation context you want to set.

constraint_index :

number

Index of the Constraint in the Creature evaluation context stack you want to set.

chain_index :

number

Index of the Chain you want the Constraint to get applied to.

Returns
This function does not return any values.

It allows you to update the chain index for a specific Chain Motion Constraint, depending on the context.

Parameters

context_index :

number

Index of the Creature evaluation context you want to set.

constraint_index :

number

Index of the Constraint in the Creature evaluation context stack you want to set.

frequency :

number

Frequency of the motion to be applied

Returns
This function does not return any values.

It allows you to update the motion frequency for a specific Chain Motion Constraint, depending on the context.

Parameters

context_index :

number

Index of the Creature evaluation context you want to set.

constraint_index :

number

Index of the Constraint in the Creature evaluation context stack you want to set.

phase :

number

Phase of the motion to be applied.

Returns
This function does not return any values.

It allows you to update the motion phase for a specific Chain Motion Constraint, depending on the context.

Parameters

context_index :

number

Index of the Creature evaluation context you want to set.

constraint_index :

number

Index of the Constraint in the Creature evaluation context stack you want to set.

pull :

number

Pull intensity of the motion.

Returns
This function does not return any values.

It allows you to update the pull intensity of the motion for a specific Chain Motion Constraint, depending on the context. Note pull can only be active when reach_t > 0.0

Parameters

context_index :

number

Index of the Creature evaluation context you want to set.

constraint_index :

number

Index of the Constraint in the Creature evaluation context stack you want to set.

reach_r :

number

Rotation reach blending factor for the motion.

Returns
This function does not return any values.

It allows you to update the rotation reach blending factor of the motion for a specific Chain Motion Constraint, depending on the context.

Parameters

context_index :

number

Index of the Creature evaluation context you want to set.

constraint_index :

number

Index of the Constraint in the Creature evaluation context stack you want to set.

reach_t :

number

Position reach blending factor for the motion.

Returns
This function does not return any values.

It allows you to update the position reach blending factor of the motion for a specific Chain Motion Constraint, depending on the context.

Parameters

context_index :

number

Index of the Creature evaluation context you want to set.

constraint_index :

number

Index of the Constraint in the Creature evaluation context stack you want to set.

motion_type :

number

Type of motion to be applied: // 0: no motion // 1: move effector position on a circle on the horizontal plan axis // 2: move effector position on the up axis, cosine movement // 3: move effector position on the right axis, cosine movement // 4: move effector position on the front axis, cosine movement // 5: move effector position around // 6: rotate effector on roll axis // 7: rotate effector on pitch axis // 8: rotate effector on yaw axis

Returns
This function does not return any values.

It allows you to update the motion type for a specific Chain Motion Constraint, depending on the context.

Parameters

context_index :

number

Index of the Creature evaluation context you want to query.

chain_index :

number

Index of the Chain you want to query.

Returns

number

Number of nodes included in this Chain for this Creature.

Parameters

context_index :

number

Index of the Creature evaluation context you want to query.

chain_index :

number

Index of the Chain you want to query.

Returns

number

Parent Section index for this Chain for this Creature.

Parameters

context_index :

number

Index of the Creature evaluation context you want to query.

constraint_index :

number

Index of the Constraint you want to query.

Returns

number

Index of the Chain for the specified Chain Pin Constraint.

Parameters

context_index :

number

Index of the Character evaluation context you want to query.

constraint_index :

number

Index of the Constraint in the Character evaluation context stack you want to query.

Returns

boolean

true if the Constraint is working in World Space.

Parameters

context_index :

number

Index of the Creature evaluation context you want to set.

constraint_index :

number

Index of the Constraint in the Creature evaluation context stack you want to set.

chain_index :

number

Index of the Chain you want the Constraint to get applied to.

Returns
This function does not return any values.

It allows you to update the effector for a specific Chain Pin Constraint, depending on the context.

Parameters

context_index :

number

Index of the Creature evaluation context you want to set.

constraint_index :

number

Index of the Constraint in the Character evaluation context stack you want to set.

world_space :

number

Set to 1 to work in World Space, otherwise reference pose is the latest evaluated pose (in local coordinates)

Returns
This function does not return any values.

It allows you to update the space (World Space/Local Space (latest evaluated pose)) for a specific Chain Pin Constraint, depending on the context.

Parameters

context_index :

number

Index of the Creature evaluation context you want to query.

constraint_index :

number

Index of the Constraint you want to query.

Returns

number

Index of the Chain for the specified Chain Properties Constraint.

Parameters

context_index :

number

Index of the Creature evaluation context you want to query.

constraint_index :

number

Index of the Constraint you want to query.

Returns

number

Compression resistance factor (between 0.0 and 1.0) of the Chain.

Parameters

context_index :

number

Index of the Creature evaluation context you want to query.

constraint_index :

number

Index of the Constraint you want to query.

Returns

number

Stiffness factor (between 0.0 and 1.0) of the Chain.

Parameters

context_index :

number

Index of the Creature evaluation context you want to set.

constraint_index :

number

Index of the Constraint in the Creature evaluation context stack you want to set.

chain_index :

number

Index of the Chain you want the Constraint to get applied to.

Returns
This function does not return any values.

It allows you to update the chain index for a specific Chain Properties Constraint, depending on the context.

Parameters

context_index :

number

Index of the Creature evaluation context you want to set.

constraint_index :

number

Index of the Constraint in the Creature evaluation context stack you want to set.

compression_resistance :

number

Stiffness factor (between 0.0 and 1.0) of the Chain.

Returns
This function does not return any values.

It allows you to update the compression resistance for a specific Chain Properties Constraint, depending on the context.

Parameters

context_index :

number

Index of the Creature evaluation context you want to set.

constraint_index :

number

Index of the Constraint in the Creature evaluation context stack you want to set.

stiffness :

number

Stiffness factor (between 0.0 and 1.0) of the Chain.

Returns
This function does not return any values.

It allows you to update the stiffness for a specific Chain Property Constraint, depending on the context.

Parameters

unit :

stingray.Unit

Unit you want to associate a context to.

resource_name :

string

name of the .creature resource associated to the unit.

Returns
This function does not return any values.

It is not necessary to explicitely declare Creature context in most cases. Creature contexts are automatically declared and created when an update event happens on the related unit It is only necessary to declare Creature contexts when you want to setup IK or retargeting on a creature before the first update happens on that Creature, especially when using flow (if you do not declare the Context, the plug-in will discard your queries).

Parameters

unit :

stingray.Unit

Unit you want to delete the context.

Returns
This function does not return any values.

Creature contexts gets automatically deleted when the world they belong is destroyed. Yet you might want to explicitely delete some Creature contexts on specific events (like a Unit Unspawn event). It is recommended to delete contexts on Creatures you wont operate with HumanIK again for performances reasons. For instance, dead Creatures should be deleted.

Parameters
This function does not accept any parameters.
Returns
This function does not return any values.

Useful for understanding/debugging. For all Creature evaluation context, this will list all current Constraints and their settings. Always call that function when you do not understand why a Creature does not react properly.

Parameters

context_index :

number

Index of the Creature evaluation context you want to query.

chain_index :

number

Index of the Chain you want to query.

Returns

stingray.Vector3

The Position of the Chain Effector.

Parameters

context_index :

number

Index of the Creature evaluation context you want to query.

chain_index :

number

Index of the Chain you want to query.

Returns

stingray.Vector3

The Position of the Chain Effector.

stingray.Quaternion

The Orientation of the Chain Effector.

Parameters

context_index :

number

Index of the Creature evaluation context you want to query.

chain_index :

number

Index of the Chain you want to query.

node_index :

number

Index of the node you want to query.

fk :

number

Set to 0 to query the IK position; Set to 1 to query the FK position.

Returns

stingray.Vector3

The Position of the Chain node.

Parameters

context_index :

number

Index of the Creature evaluation context you want to query.

constraint_index :

number

Index of the Constraint you want to query.

Returns

number

Constraint type (see valued in main "HumanIK.lua" file).

Parameters

context_index :

number

Index of the Creature evaluation context you want to query.

Returns

string

A debug name for for the context.

Parameters

context_index :

number

Index of the Creature evaluation context you want to affect.

Returns

boolean

true if the FK rig has to be drawn in the editor viewports.

boolean

true if the IK rig has to be drawn in the editor viewports.

boolean

true if rigs should always be drawn, even when the unit is not selected.

Parameters

context_index :

number

Index of the Creature evaluation context you want to query.

line_index :

number

Index of the line you want to query.

Returns

stingray.Quaternion

The line color expressed as a quaternion.

Parameters

context_index :

number

Index of the Creature evaluation context you want to query.

line_index :

number

Index of the line you want to query.

Returns

stingray.Vector3

End point 1 position for the line (in world coordinates).

stingray.Vector3

End point 2 position for the line (in world coordinates).

Parameters

context_index :

number

Index of the Creature evaluation context you want to query.

marker_index :

number

Index of the marker you want to query.

Returns

stingray.Quaternion

The marker color expressed as a quaternion.

Parameters

context_index :

number

Index of the Creature evaluation context you want to query.

marker_index :

number

Index of the marker you want to query.

Returns

stingray.Vector3

Position of the marker (in world coordinates).

Parameters

context_index :

number

Index of the Creature evaluation context you want to query.

section_index :

number

Index of the Section you want to query.

Returns

stingray.Vector3

The Position of the Section Effector.

Parameters

context_index :

number

Index of the Creature evaluation context you want to query.

section_index :

number

Index of the Section you want to query.

Returns

stingray.Vector3

The Position of the Section Effector.

stingray.Quaternion

The Orientation of the Section Effector.

Parameters

context_index :

number

Index of the Creature evaluation context you want to query.

Returns

number

Number of Chains implemented by this Creature.

Parameters

context_index :

number

Index of the Creature evaluation context you want to query.

Returns

number

Number of Constraints currently in the stack for that context.

Parameters

context_index :

number

Index of the Creature evaluation context you want to query.

Returns

number

Number of lines associated to that context.

Lines are mostly used for debugging purposes to display key positions during IK computations. A line pointing from a Creature head to another Creature head might. get generated by the look at Constraint, for instance.

Parameters

context_index :

number

Index of the Creature evaluation context you want to query.

Returns

number

Number of markers associated to that context.

Markers are mostly used for debugging purposes to display key positions during IK computation. A ray cast collision point computed during floor contact computation might generate a marker, for instance.

Parameters

context_index :

number

Index of the Creature evaluation context you want to query.

Returns

number

Number of Sections implemented by this Creature.

Parameters

context_index :

number

Index of the Creature evaluation context you want to query.

constraint_index :

number

Index of the Constraint you want to query.

Returns

number

Index of the Chain representing the back left leg for the specified Plant Constraint.

Parameters

context_index :

number

Index of the Creature evaluation context you want to query.

constraint_index :

number

Index of the Constraint you want to query.

Returns

number

Index of the Chain representing the back right leg for the specified Plant Constraint.

Parameters

context_index :

number

Index of the Creature evaluation context you want to query.

constraint_index :

number

Index of the Constraint you want to query.

Returns

number

The amount of chest rotation to get preserve

Parameters

context_index :

number

Index of the Creature evaluation context you want to query.

constraint_index :

number

Index of the Constraint you want to query.

Returns

number

Index of the Section representing the chest for the specified Plant Constraint.

Parameters

context_index :

number

Index of the Creature evaluation context you want to query.

constraint_index :

number

Index of the Constraint you want to query.

Returns

number

Index of the Chain representing the front left leg for the specified Plant Constraint.

Parameters

context_index :

number

Index of the Creature evaluation context you want to query.

constraint_index :

number

Index of the Constraint you want to query.

Returns

number

Index of the Chain representing the front right leg for the specified Plant Constraint.

Parameters

context_index :

number

Index of the Creature evaluation context you want to query.

constraint_index :

number

Index of the Constraint you want to query.

Returns

number

Index of the Section representing the hips for the specified Plant Constraint.

Parameters

context_index :

number

Index of the Creature evaluation context you want to query.

constraint_index :

number

Index of the Constraint you want to query.

Returns

number

Number of rays that get cast to scan the ground topology

Parameters

context_index :

number

Index of the Creature evaluation context you want to query.

constraint_index :

number

Index of the Constraint you want to query.

Returns

number

Vertical distance downwards (from the ankle/wrists effectors) for the rayacst ray end position.

Parameters

context_index :

number

Index of the Creature evaluation context you want to query.

constraint_index :

number

Index of the Constraint you want to query.

Returns

number

Vertical distance upwards (from the ankle/wrists effectors) for the raycast ray start position.

Parameters

context_index :

number

Index of the Creature evaluation context you want to query.

constraint_index :

number

Index of the Constraint you want to query.

Returns

number

Smoothing intensity for the constraint

Parameters

context_index :

number

Index of the Creature evaluation context you want to set.

constraint_index :

number

Index of the Constraint in the Creature evaluation context stack you want to set.

back_left_leg_chain_index :

number

Index of the Chain representing the back left leg.

Returns
This function does not return any values.

It allows you to update the chain index representing the back left leg for a specific Plant Constraint, depending on the context.

Parameters

context_index :

number

Index of the Creature evaluation context you want to set.

constraint_index :

number

Index of the Constraint in the Creature evaluation context stack you want to set.

back_right_leg_chain_index :

number

Index of the Chain representing the back right leg.

Returns
This function does not return any values.

It allows you to update the chain index representing the back right leg for a specific Plant Constraint, depending on the context.

Parameters

context_index :

number

Index of the Creature evaluation context you want to tune.

constraint_index :

number

Index of the Constraint you want to tune.

chest_rotation_preserve :

number

Amount of original rotation to preserve (between 0.0 and 1.0)

Returns
This function does not return any values.
Parameters

context_index :

number

Index of the Creature evaluation context you want to set.

constraint_index :

number

Index of the Constraint in the Creature evaluation context stack you want to set.

chest_section_index :

number

Index of the Section representing the chest.

Returns
This function does not return any values.

It allows you to update the section index representing the chest for a specific Plant Constraint, depending on the context.

Parameters

context_index :

number

Index of the Creature evaluation context you want to set.

constraint_index :

number

Index of the Constraint in the Creature evaluation context stack you want to set.

front_left_leg_chain_index :

number

Index of the Chain representing the front left leg.

Returns
This function does not return any values.

It allows you to update the chain index representing the front left leg for a specific Plant Constraint, depending on the context.

Parameters

context_index :

number

Index of the Creature evaluation context you want to set.

constraint_index :

number

Index of the Constraint in the Creature evaluation context stack you want to set.

front_right_leg_chain_index :

number

Index of the Chain representing the front right leg.

Returns
This function does not return any values.

It allows you to update the chain index representing the front right leg for a specific Plant Constraint, depending on the context.

Parameters

context_index :

number

Index of the Creature evaluation context you want to set.

constraint_index :

number

Index of the Constraint in the Creature evaluation context stack you want to set.

hips_section_index :

number

Index of the Section representing the hips.

Returns
This function does not return any values.

It allows you to update the section index representing the hips for a specific Plant Constraint, depending on the context.

Parameters

context_index :

number

Index of the Creature evaluation context you want to tune.

constraint_index :

number

Index of the Constraint you want to tune.

nb_rays :

number

Number of rays that get cast to scan the ground topology (1 is minimum; 9 is a generous value)

Returns
This function does not return any values.
Parameters

context_index :

number

Index of the Creature evaluation context you want to tune.

constraint_index :

number

Index of the Constraint you want to tune.

ray_down_length :

number

Vertical distance downwards (from the ankle/wrists effectors) for the rayacst ray end position

Returns
This function does not return any values.
Parameters

context_index :

number

Index of the Creature evaluation context you want to tune.

constraint_index :

number

Index of the Constraint you want to tune.

ray_up_length :

number

Vertical distance upwards (from the ankle/wrists effectors) for the raycast ray start position.

Returns
This function does not return any values.
Parameters

context_index :

number

Index of the Creature evaluation context you want to tune.

constraint_index :

number

Index of the Constraint you want to tune.

smoothing :

number

Smoothing intensity for adjustments (0.0 means no smoothing at all)

Returns
This function does not return any values.
Parameters

context_index :

number

Index of the Creature evaluation context to modify.

Returns
This function does not return any values.
Parameters

context_index :

number

Index of the Creature evaluation context to modify.

Returns
This function does not return any values.

After that call, the IK Constraints stack for that Creature will be empty.

Parameters

context_index :

number

Index of the Creature evaluation context you want to push the Constraint to.

chain :

number

Index of the Creature Chain to apply the motion.

motion_type :

number

Type of motion to be applied: * 0: no motion * 1: move effector position on a circle on the horizontal plan axis * 2: move effector position on the up axis, cosine movement * 3: move effector position on the right axis, cosine movement * 4: move effector position on the front axis, cosine movement * 5: move effector position around * 6: rotate effector on roll axis * 7: rotate effector on pitch axis * 8: rotate effector on yaw axis

amplitude :

number

Amplitude of the motion.

frequency :

number

Frequency of the motion.

phase :

number

Phase (in seconds) of the Chain motion.

pull :

number

Pull strength of the motion.

reach_t :

number

Position reach blending factor.

reach_r :

number

Orientation reach blending factor.

alpha :

number

Alpha value (strength/intensity) of the Constraint (between 0.0 and 1.0).

blend_in_time :

number

Time (in seconds) for the Constraint to become fully active (to reach its alpha value).

constraint_id :

number

Constraint ID for later retrieving and tuning the Constraint (can be -1 if no tracking is required).

Returns
This function does not return any values.

A 'motion' Constraint is a very basic way of applying procedural motion to an effector. Hardcoded motions are available for making an effector move up and down, oscillate, ...

Parameters

context_index :

number

Index of the Creature evaluation context you want to solve.

chain :

number

Index of the Chain node representing to be pinned

Returns
This function does not return any values.
Parameters

context_index :

number

Index of the Creature evaluation context to affect.

chain :

number

Index of the Chain to set properties for

stiffness :

number

Stiffness factor (between 0.0 and 1.0) of the Chain

compression_resistance :

number

Compression resistance factor (between 0.0 and 1.0) of the Chain

Returns
This function does not return any values.
Parameters

context_index :

number

Index of the Creature evaluation context you want to solve.

chain :

number

Index of the Chain node representing to be reached

pull :

number

Pull value

Returns
This function does not return any values.
Parameters

context_index :

number

Index of the Creature evaluation context you want to solve.

chain :

number

Index of the Chain node representing to be reached

position :

stingray.Vector3

Target position to get reached

world_space :

number

Set to 1 to work in World Space, Set to 0 to work in Character Space.

Returns
This function does not return any values.

The target position can either be expressed in World Space or in Character Space depending on the space value.

Parameters

context_index :

number

Index of the Creature evaluation context you want to solve.

chain :

number

Chain to be considered as a limb to apply floor contact on.

distance_up :

number

Altitude from current effector position to start the floor collision ray cast from

distance_down :

number

Altitude from current effector position to end the floor collision ray cast

pull :

number

Pull value to apply when collision gets found

height :

number

Chain plant/hoof vertical thickness

Returns
This function does not return any values.
Parameters

context_index :

number

Index of the Creature evaluation context you want to solve.

hips_section_index :

number

Index of the section node to be considered as quadruped hips

chest_section_index :

number

Index of the section node to be considered as quadruped chest

front_left_leg_chain_index :

number

Index of the chain to be considered as quadruped left front leg

front_right_leg_chain_index :

number

Index of the chain to be considered as quadruped right front leg

back_left_leg_chain_index :

number

Index of the chain to be considered as quadruped left back leg

back_right_leg_chain_index :

number

Index of the chain to be considered as quadruped right back leg

nb_rays :

number

Number of rays to cast to scan terrain position and normal (1 is minimum; 9 is a generous value)

ray_up_length :

number

Vertical distance upwards (from the ankle/wrists effectors) for the raycast ray start position

ray_down_length :

number

Vertical distance downwards (from the ankle/wrists effectors) for the rayacst ray end position

smoothing :

number

Smoothing intensity (0.0 means no smoothing 1.5 is usually a good value).

chest_rotation_preserve :

number

Amount of the original chest orientation to preserve

Returns
This function does not return any values.

It affects the hips and chest transforms.

Parameters

context_index :

number

Index of the Creature evaluation context you want to push the Constraint to.

section :

number

Index of the Creature Section to apply the motion.

motion_type :

number

Type of motion to be applied: * 0: no motion * 1: move effector position on a circle on the horizontal plan axis * 2: move effector position on the up axis, cosine movement * 3: move effector position on the right axis, cosine movement * 4: move effector position on the front axis, cosine movement * 5: move effector position around * 6: rotate effector on roll axis * 7: rotate effector on pitch axis * 8: rotate effector on yaw axis

amplitude :

number

Amplitude of the motion.

frequency :

number

Frequency of the motion.

phase :

number

Phase (in seconds) of the Section motion.

pull :

number

Pull strength of the motion.

reach_t :

number

Position reach blending factor.

reach_r :

number

Orientation reach blending factor.

alpha :

number

Alpha value (strength/intensity) of the Constraint (between 0.0 and 1.0).

blend_in_time :

number

Time (in seconds) for the Constraint to become fully active (to reach its alpha value).

constraint_id :

number

Constraint ID for later retrieving and tuning the Constraint (can be -1 if no tracking is required).

Returns
This function does not return any values.

A 'motion' Constraint is a very basic way of applying procedural motion to an effector. Hardcoded motions are available for making an effector move up and down, oscillate, ...

Parameters

context_index :

number

Index of the Creature evaluation context to affect.

chain :

number

Index of the Chain to set properties for

extra_pull :

number

Factor for extra pull to be generated by Section Chains

Returns
This function does not return any values.
Parameters

context_index :

number

Index of the Creature evaluation context you want to solve.

chain :

number

Index of the Chain node representing to be reached

reach_t :

number

ReachT value

Returns
This function does not return any values.
Parameters

context_index :

number

Index of the Creature evaluation context you want to solve.

Returns
This function does not return any values.
Parameters

context_index :

number

Index of the Creature evaluation context you want to query.

section_index :

number

Index of the Section you want to query the name.

Returns

string

A debug name for for the context.

Parameters

context_index :

number

Index of the Creature evaluation context you want to query.

constraint_index :

number

Index of the Constraint you want to query.

Returns

number

Amplitude of the motion for the specified Section Motion Constraint.

Parameters

context_index :

number

Index of the Creature evaluation context you want to query.

constraint_index :

number

Index of the Constraint you want to query.

Returns

number

Frequency (in Hz) of the motion for the specified Section Motion Constraint.

Parameters

context_index :

number

Index of the Creature evaluation context you want to query.

constraint_index :

number

Index of the Constraint you want to query.

Returns

number

Phase (in seconds) of the motion for the specified Section Motion Constraint.

Parameters

context_index :

number

Index of the Creature evaluation context you want to query.

constraint_index :

number

Index of the Constraint you want to query.

Returns

number

Pull strength (between 0.0 and 1.0) of the motion for the specified Section Motion Constraint.

Parameters

context_index :

number

Index of the Creature evaluation context you want to query.

constraint_index :

number

Index of the Constraint you want to query.

Returns

number

Orientation reach blending factor (between 0.0 and 1.0) of the motion for the specified Section Motion Constraint.

Parameters

context_index :

number

Index of the Creature evaluation context you want to query.

constraint_index :

number

Index of the Constraint you want to query.

Returns

number

Translation reach blending factor (between 0.0 and 1.0) of the motion for the specified Section Motion Constraint.

Parameters

context_index :

number

Index of the Creature evaluation context you want to query.

constraint_index :

number

Index of the Constraint you want to query.

Returns

number

Index of the Section for the specified Section Motion Constraint.

Parameters

context_index :

number

Index of the Creature evaluation context you want to query.

constraint_index :

number

Index of the Constraint you want to query.

Returns

number

Type of the motion for the specified Section Motion Constraint.

Parameters

context_index :

number

Index of the Creature evaluation context you want to set.

constraint_index :

number

Index of the Constraint in the Creature evaluation context stack you want to set.

amplitude :

number

Amplitude of the motion to be applied.

Returns
This function does not return any values.

It allows you to update the motion amplitude for a specific Section Motion Constraint, depending on the context.

Parameters

context_index :

number

Index of the Creature evaluation context you want to set.

constraint_index :

number

Index of the Constraint in the Creature evaluation context stack you want to set.

frequency :

number

Frequency of the motion to be applied.

Returns
This function does not return any values.

It allows you to update the motion frequency for a specific Section Motion Constraint, depending on the context.

Parameters

context_index :

number

Index of the Creature evaluation context you want to set.

constraint_index :

number

Index of the Constraint in the Creature evaluation context stack you want to set.

phase :

number

Phase of the motion to be applied.

Returns
This function does not return any values.

It allows you to update the motion phase for a specific Section Motion Constraint, depending on the context.

Parameters

context_index :

number

Index of the Creature evaluation context you want to set.

constraint_index :

number

Index of the Constraint in the Creature evaluation context stack you want to set.

pull :

number

Pull intensity of the motion.

Returns
This function does not return any values.

It allows you to update the pull intensity of the motion for a specific Section Motion Constraint, depending on the context. Note pull can only be active when reach_t > 0.0

Parameters

context_index :

number

Index of the Creature evaluation context you want to set.

constraint_index :

number

Index of the Constraint in the Creature evaluation context stack you want to set.

reach_r :

number

Rotation reach blending factor for the motion.

Returns
This function does not return any values.

It allows you to update the rotation reach blending factor of the motion for a specific Section Motion Constraint, depending on the context.

Parameters

context_index :

number

Index of the Creature evaluation context you want to set.

constraint_index :

number

Index of the Constraint in the Creature evaluation context stack you want to set.

reach_t :

number

Position reach blending factor for the motion.

Returns
This function does not return any values.

It allows you to update the position reach blending factor of the motion for a specific Section Motion Constraint, depending on the context.

Parameters

context_index :

number

Index of the Creature evaluation context you want to set.

constraint_index :

number

Index of the Constraint in the Creature evaluation context stack you want to set.

section_index :

number

Index of the Section you want the Constraint to get applied to.

Returns
This function does not return any values.

It allows you to update the section index for a specific Section Pin Constraint, depending on the context.

Parameters

context_index :

number

Index of the Creature evaluation context you want to set.

constraint_index :

number

Index of the Constraint in the Creature evaluation context stack you want to set.

motion_type :

number

Type of motion to be applied: // 0: no motion // 1: move effector position on a circle on the horizontal plan // 2: move effector position on the up axis, cosine movement // 3: move effector position on the right axis, cosine movement // 4: move effector position on the front axis, cosine movement // 5: move effector position on a sphere // 6: rotate effector on roll axis // 7: rotate effector on pitch axis // 8: rotate effector on yaw axis

Returns
This function does not return any values.

It allows you to update the motion type for a specific Section Motion Constraint, depending on the context.

Parameters

context_index :

number

Index of the Creature evaluation context you want to query.

constraint_index :

number

Index of the Constraint you want to query.

Returns

number

Factor for extra pull to be generated by Section Chains.

Parameters

context_index :

number

Index of the Creature evaluation context you want to query.

constraint_index :

number

Index of the Constraint you want to query.

Returns

number

Index of the Section for the specified Section Properties Constraint.

Parameters

context_index :

number

Index of the Creature evaluation context you want to set.

constraint_index :

number

Index of the Constraint in the Creature evaluation context stack you want to set.

extra_pull :

number

Factor for extra pull to be generated by Section Chains

Returns
This function does not return any values.

It allows you to update the extra pull factor for a specific Section Property Constraint, depending on the context.

Parameters

context_index :

number

Index of the Creature evaluation context you want to set.

constraint_index :

number

Index of the Constraint in the Creature evaluation context stack you want to set.

section_index :

number

Index of the Section you want the Constraint to get applied to.

Returns
This function does not return any values.

It allows you to update the section index for a specific Section Properties Constraint, depending on the context.

Parameters

context_index :

number

Index of the Creature evaluation context you want to affect.

draw_fk :

boolean

Set to true to draw the FK rig in the editor viewports.

draw_ik :

boolean

Set to true to draw the IK rig in the editor viewports.

draw_always :

boolean

Set to true to always draw the rigs in the editor viewports, even when the unit is not selected.

Returns
This function does not return any values.
Parameters

context_index :

number

Index of the Creature evaluation context you want to query.

chain_index :

number

Index of the Chain you want to query the name.

iteration :

number

Solving iteration to query

Returns

stingray.Vector3

The last rotation error axis for that Chain

number

The last rotation error angle (in degrees) for that Chain

Retrieve the last rotation error for a Creature Chain

Parameters

context_index :

number

Index of the Creature evaluation context you want to query.

chain_index :

number

Index of the Chain you want to query the name.

iteration :

number

Solving iteration to query

Returns

number

The last error weight for that Chain

Retrieve the last error weight for a Creature Chain

Parameters

context_index :

number

Index of the Creature evaluation context you want to query.

chain_index :

number

Index of the Chain you want to query the name.

iteration :

number

Solving iteration to query

Returns

stingray.Vector3

The last error vector for that Chain

Retrieve the last error vector for a Creature Chain

Parameters

context_index :

number

Index of the Creature evaluation context you want to query.

chain_index :

number

Index of the Chain you want to query the name.

Returns

number

The last translation weight for that Chain

Retrieve the last translation weight for a Creature Chain

Parameters

context_index :

number

Index of the Creature evaluation context you want to query.

section_index :

number

Index of the Section you want to query the name.

iteration :

number

Solving iteration to query

Returns

stingray.Vector3

The last rotation error axis for that section

number

The last rotation error angle (in degrees) for that Section

Retrieve the last rotation error for a Creature Section

Parameters

context_index :

number

Index of the Creature evaluation context you want to query.

section_index :

number

Index of the Section you want to query the name.

iteration :

number

Solving iteration to query

Returns

stingray.Vector3

The last rotation error axis for that section

number

The last rotation error angle (in degrees) for that Section

Retrieve the last rotation error for a Creature Section

Parameters

context_index :

number

Index of the Creature evaluation context you want to query.

section_index :

number

Index of the Section you want to query the name.

iteration :

number

Solving iteration to query

Returns

number

The last error weight for that Section

Retrieve the last error weight for a Creature Section

Parameters

context_index :

number

Index of the Creature evaluation context you want to query.

section_index :

number

Index of the Section you want to query the name.

iteration :

number

Solving iteration to query

Returns

number

The last Section weights for that Section

Retrieve the last Section weights for a Creature Section

Parameters

context_index :

number

Index of the Creature evaluation context you want to query.

section_index :

number

Index of the Section you want to query the name.

iteration :

number

Solving iteration to query

Returns

stingray.Vector3

The last error vector for that Section

Retrieve the last error vector for a Creature Section

Parameters

do_enable :

boolean

Set to true to enable HumanIK; set to false to disable HumanIK.

Returns
This function does not return any values.

If you do not intend to use HumanIK, it is better to keep it disabled to spare CPU time.

Parameters

do_enable :

boolean

Set to true to enable collisions debug mode; set to false to disable collisions debug mode.

Returns
This function does not return any values.

This helps visualizing, understanding and debugging floor contact issues.

Parameters

do_enable :

boolean

Set to true to enable X-rays mode; set to false to disable X-rays mode.

Returns
This function does not return any values.

X-rays mode displays quantity of useful debug information in the game viewport (rigs, targets, markers, ...).

Parameters
This function does not accept any parameters.
Returns

boolean

true if HumanIK is enabled.

Parameters

do_reveal :

boolean

Set to true to display all HumanIK rigs and markers; set to false to conceal them.

Returns
This function does not return any values.