public static class ConstraintGizmosDraws what a constrained pose is trying to do, and how badly it is failing.
Remarks
An author sees the constraint failing before a build does. That is the whole claim, and everything here serves it: the effector, the place the goal resolved to, the joints the solver was allowed to move, the proxy shape a surface coordinate is anchored to, and — the one that matters — a line from where the effector ended up to where it was wanted, coloured by how far that is.
⚠ It reads LastSolved rather than re-resolving. A gizmo pass that resolved the frames again would draw a second, subtly different answer — one frame later, against a pose the solver has already moved — and the times that difference is largest are exactly the times somebody has the gizmos on. What is drawn is what happened.
⚠ It draws into DebugDraw, not into an editor viewport. So it is testable with no window, and a game can switch it on in a debug build to see why a hand is through a wall on a player's machine — which is where these failures actually get reported.
Methods (2)
public static void Draw(DebugDraw draw, ConstraintStack stack, ReadOnlySpan<BoneTransform> model, ConstraintGizmoStyle? style = null)Draws every goal the last solve resolved.
public static void DrawShapes(DebugDraw draw, ProxyShapes shapes, ReadOnlySpan<BoneTransform> model, in BoneTransform world, Color4? colour = null)One line each, for whatever is worth saying about a shape set.
Used by (3)
- ConstraintGizmoSystemVixen.Animation
- GizmoTestsVixen.Animation.Tests
- ProxyShapeViewVixen.Editor.AssetEditors