Spun off from review on #13 / #14.
In PositionHandle.Initialize, each PositionPlane is initialized so that the plane it constrains to does not match the axis pair that enables it. Concretely, on `main` today:
| Plane GameObject |
Enabled when |
Initialize args (axis1, axis2, perp) |
Actual constraint plane |
Expected for the enabling pair |
zPlane |
HasBothAxes(X, Y) |
(forward, up, -right) |
YZ (normal = X) |
XY (normal = Z) |
xPlane |
HasBothAxes(Y, Z) |
(right, forward, up) |
XZ (normal = Y) |
YZ (normal = X) |
yPlane |
HasBothAxes(X, Z) |
(right, up, forward) |
XY (normal = Z) |
XZ (normal = Y) |
So when the user selects (say) HandleAxes.XY and drags the plane gizmo, the target moves in the YZ plane instead of XY.
This is an existing bug on main; #14 leaves it alone to keep that PR focused on #10.
Two ways to fix:
- Adjust
Initialize args so each plane constrains to the plane indicated by the enabling axis pair. This also moves the visual quad (_quadGameObject.localPosition = (axis1+axis2)*0.2) to sit between the two enabling axes — which is what users would expect visually.
- Adjust the enabling conditions so each plane GameObject activates when the axis pair matching its current constraint is selected. Keeps the existing visual positions but is less intuitive in naming.
Recommend option 1.
Spun off from review on #13 / #14.
In
PositionHandle.Initialize, eachPositionPlaneis initialized so that the plane it constrains to does not match the axis pair that enables it. Concretely, on `main` today:zPlaneHasBothAxes(X, Y)(forward, up, -right)xPlaneHasBothAxes(Y, Z)(right, forward, up)yPlaneHasBothAxes(X, Z)(right, up, forward)So when the user selects (say)
HandleAxes.XYand drags the plane gizmo, the target moves in the YZ plane instead of XY.This is an existing bug on
main; #14 leaves it alone to keep that PR focused on #10.Two ways to fix:
Initializeargs so each plane constrains to the plane indicated by the enabling axis pair. This also moves the visual quad (_quadGameObject.localPosition = (axis1+axis2)*0.2) to sit between the two enabling axes — which is what users would expect visually.Recommend option 1.