|
4 | 4 | * Coordinate convention (must match the renderer's rig — see spec/SPEC.md): |
5 | 5 | * Rest pose: standing, arms at sides, facing +Z. Each bone rotates in its |
6 | 6 | * own local frame where |
7 | | - * X = sagittal plane (flexion +, extension -) |
8 | | - * Y = longitudinal (internal rotation +, external -) |
9 | | - * Z = frontal plane (abduction +, adduction -) |
10 | | - * Left-side bones mirror the Y and Z axes so symmetric cues look symmetric. |
| 7 | + * X = sagittal plane (flexion / extension) |
| 8 | + * Y = longitudinal (internal / external rotation) |
| 9 | + * Z = frontal plane (abduction / adduction) |
| 10 | + * The unmirrored sign of each action is the RIGHT side's (the body's right |
| 11 | + * is -X); left-side bones mirror the Y and Z axes so symmetric cues look |
| 12 | + * symmetric — `shoulders: abduct 80` lifts both arms away from the midline. |
11 | 13 | */ |
12 | 14 |
|
13 | 15 | import type { Axis } from "./types.js"; |
@@ -134,8 +136,14 @@ export interface ActionAxis { |
134 | 136 | const ACTIONS: Record<string, ActionAxis> = { |
135 | 137 | flex: { axis: "x", sign: 1 }, |
136 | 138 | extend: { axis: "x", sign: -1 }, |
137 | | - abduct: { axis: "z", sign: 1 }, |
138 | | - adduct: { axis: "z", sign: -1 }, |
| 139 | + // Frontal plane. The unmirrored sign is the RIGHT side's; with every bone |
| 140 | + // resting along -Y and the right side of the body at -X, carrying a limb |
| 141 | + // AWAY from the midline (abduction) is a -Z rotation. The left side mirrors |
| 142 | + // to +Z. (Base sign +1 here was a bug that swung both arms and both legs |
| 143 | + // through the torso.) For the unmirrored axial bones (spine/neck) abduct |
| 144 | + // reads as lateral flexion toward the person's left. |
| 145 | + abduct: { axis: "z", sign: -1 }, |
| 146 | + adduct: { axis: "z", sign: 1 }, |
139 | 147 | "rotate-in": { axis: "y", sign: 1 }, |
140 | 148 | "rotate-out": { axis: "y", sign: -1 }, |
141 | 149 | supinate: { axis: "y", sign: 1 }, |
|
0 commit comments