Class ConstraintFollower
- Namespace
- WitShells.AnimationRig
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
LeftHandBinding
public ConstraintBinding LeftHandBinding { get; }
Property Value
LeftLegBinding
public ConstraintBinding LeftLegBinding { get; }
Property Value
MasterWeight
public float MasterWeight { get; set; }
Property Value
RigReferences
public RigReferences RigReferences { get; set; }
Property Value
RightHandBinding
public ConstraintBinding RightHandBinding { get; }
Property Value
RightLegBinding
public ConstraintBinding RightLegBinding { get; }
Property Value
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
SetBindingWeight(ConstraintType, float)
Sets the weight for a specific constraint binding.
public void SetBindingWeight(ConstraintFollower.ConstraintType type, float weight)
Parameters
typeConstraintFollower.ConstraintTypeweightfloat
SetFollowPosition(ConstraintType, bool)
Enables or disables position following for a specific constraint.
public void SetFollowPosition(ConstraintFollower.ConstraintType type, bool follow)
Parameters
typeConstraintFollower.ConstraintTypefollowbool
SetFollowRotation(ConstraintType, bool)
Enables or disables rotation following for a specific constraint.
public void SetFollowRotation(ConstraintFollower.ConstraintType type, bool follow)
Parameters
typeConstraintFollower.ConstraintTypefollowbool
SetSource(ConstraintType, Transform)
Sets the source transform for a specific constraint.
public void SetSource(ConstraintFollower.ConstraintType type, Transform source)
Parameters
typeConstraintFollower.ConstraintTypesourceTransform