Skip to content

CVR Leg

Procedural leg used for spider/walker creatures and vehicles. The component spawns a Final IK CCDIK solver on the same GameObject, takes a chain of bones as input, drives foot placement via raycast, and applies holding force to a linked Rigidbody. Pairs with CVR Movement Driver for multi-leg creatures.

Ordered list of Transforms — the IK chain from hip to foot. Added to the CCDIK solver on Awake.

When enabled, the last entry in Segments is treated as a foot and its rotation is re-aligned to the ground surface after IK runs.

Offset applied along the foot’s up-axis so the IK target sits above the ground by this amount.

LayerMask used by the step raycast. Typically “Default” plus the floor layers.

Rigidbody the leg supports (and whose velocity it samples for step anticipation).

Maximum upward force applied to the linked Rigidbody when the leg is grounded and not stepping. Default 10000.

Vector from the leg root to the ideal resting foot position (in local space). Used both as the support raycast direction and as the default foot location. Default Vector3.down.

Radius around the step area center within which the foot may rest. If the IK target drifts outside this, a new step is triggered.

Multiplier for step progress (higher = faster step animation). Default 5.

Vertical apex of the step animation in meters. The step arc is multiplied by Y Offset.

AnimationCurve sampled between 0 (start of step) and 1 (end of step); multiplied by Step Height to produce the arc of each step. The Awake override replaces the serialized curve with (0,0) (0.5,1) (1,0) by default.

Minimum time between steps on this leg, in seconds. Default 0.2.

Slerp speed for aligning the foot to the ground normal after each frame of IK. Default 10.

Scales the linked Rigidbody’s velocity when choosing the next step target, so fast-moving legs plant ahead. Default 0.1.

A leg that should never step simultaneously with this one.

Legs that also block stepping while they step.

When enabled, also triggers a step if the IK target has drifted outside 25% of Step Area Radius from its target, giving humanoid legs a tighter gait.

When enabled, disables the automatic step system; the leg reads its IK target from Input Target Location instead.

External transform used as the IK target when Use Target Location is on. Typically driven by an animation.

Optional transform that mirrors the current IK target every frame, useful for tethering visual effects to the foot.

MemberDescription
isSteppingTrue while the step coroutine is active.
ApplyForce(rb)Called by CVR Movement Driver to apply the PID support force to the linked Rigidbody.
UpdateIK(velocity)Runs each FixedUpdate; determines whether a new step should be started.
SetUseTargetLocation(bool)Runtime toggle for Use Target Location.
IsFootOnGround()True when a step has finished and the foot is resting.
  • CVR-GameFiles/ABI.CCK.Components/CVRLeg.cs