Vixen
02b45cc4
csharp
public readonly record struct TwoBoneIkTarget

What a two-bone chain is being asked to do.

No guide page documents this yet — the page shows what the code says about itself.

Remarks

Model space, not world space. The solver works on a pose, and a pose has no opinion about where the character is. A caller with a world-space target — a ledge, a ground hit — transforms it by the entity's inverse world matrix first, which is one matrix inverse per character rather than one per joint.

The pole is a point, not a direction. A direction has to be re-expressed every time the character turns; a point can be a socket on the character, a fixed spot in the level, or a hand-authored offset from the root, and it stays meaningful in all three.

Fields and properties (8)

  • public int Root

    The joint at the top of the chain — a shoulder, a hip.

  • public int Mid

    The joint in the middle — an elbow, a knee.

  • public int Tip

    The joint at the end — a wrist, an ankle.

  • public Vector3 Position

    Where the tip should be, in model space.

  • public Vector3 Pole

    A point in model space the middle joint bends towards — where the elbow points.

  • public Quaternion Rotation

    What the tip's orientation should be, in model space.

  • public float PositionWeight

    How much of the way to the target to go, in [0, 1].

  • public float RotationWeight

    How much of the tip's orientation to force, in [0, 1].

Methods (1)

  • public TwoBoneIkTarget(int Root, int Mid, int Tip, Vector3 Position, Vector3 Pole, Quaternion Rotation = default(Quaternion), float PositionWeight = 1, float RotationWeight = 0)

    What a two-bone chain is being asked to do.

Used by (2)

  • IkTestsVixen.Animation.Tests
  • TwoBoneIkVixen.Animation