Table of Contents

Class ConstraintFollower

Controls IK constraint targets by following assigned transform references. Allows toggling position/rotation constraints independently for hands, legs, and head.

public class ConstraintFollower : MonoBehaviour
Inheritance
ConstraintFollower

Properties

HeadBinding

public ConstraintBinding HeadBinding { get; }

Property Value

ConstraintBinding

LeftHandBinding

public ConstraintBinding LeftHandBinding { get; }

Property Value

ConstraintBinding

LeftLegBinding

public ConstraintBinding LeftLegBinding { get; }

Property Value

ConstraintBinding

MasterWeight

public float MasterWeight { get; set; }

Property Value

float

RigReferences

public RigReferences RigReferences { get; set; }

Property Value

RigReferences

RightHandBinding

public ConstraintBinding RightHandBinding { get; }

Property Value

ConstraintBinding

RightLegBinding

public ConstraintBinding RightLegBinding { get; }

Property Value

ConstraintBinding

Methods

ClearAllSources()

Clears all source references.

public void ClearAllSources()

SetAllBindings(Transform, bool, bool)

Sets all bindings to follow the same target with configurable position/rotation.

public void SetAllBindings(Transform source, bool followPosition = true, bool followRotation = true)

Parameters

source Transform
followPosition bool
followRotation bool

SetBindingWeight(ConstraintType, float)

Sets the weight for a specific constraint binding.

public void SetBindingWeight(ConstraintFollower.ConstraintType type, float weight)

Parameters

type ConstraintFollower.ConstraintType
weight float

SetFollowPosition(ConstraintType, bool)

Enables or disables position following for a specific constraint.

public void SetFollowPosition(ConstraintFollower.ConstraintType type, bool follow)

Parameters

type ConstraintFollower.ConstraintType
follow bool

SetFollowRotation(ConstraintType, bool)

Enables or disables rotation following for a specific constraint.

public void SetFollowRotation(ConstraintFollower.ConstraintType type, bool follow)

Parameters

type ConstraintFollower.ConstraintType
follow bool

SetSource(ConstraintType, Transform)

Sets the source transform for a specific constraint.

public void SetSource(ConstraintFollower.ConstraintType type, Transform source)

Parameters

type ConstraintFollower.ConstraintType
source Transform