I need help on figuring out a way to visualize ANGULAR locks and limits on a PhysicsConstraint.
I originally thought that showing a ball in a channel or disk could represent an angularly LOCKED or LIMITED axis. Locking two axes (as shown in the front row of the playground) does lock one axis’ “ball” in place. But how do I represent a single rotationally-LOCKED axis?
(on the plus side, this problem of triple-locked axes reported by @regna seems to have been solved by @eoin, so I don’t think that that is still a problem)
This playground provides the context for this discussion. Tap to apply random forces.
Setup: All combinations of ANGULAR axis locks are represented in the playground. Each set of red/yellow boxes each have a constraint between them with the Pivot point at the center of each box. World-space X and Y axes are aligned with the red box’s Axis and PerpAxis respectively. The Red, Green, and Blue spheres are separated from the yellow box’s Pivot point and each is located along the axes defined by its Axis (red), PerpAxis (green), and the normal of those axes (blue).
In this playground, tapping the screen imparts a force to each yellow box of random direction at a random point relative to the center of mass. The red boxes are all fixed.
All constraints are locked linearly, but vary in their application of FREE or LOCKED angular degrees of freedom. Representing a FREE angular axis as “0” LOCKED as “1”, the XYZ angular locks of a constraint can be all FREE “000” or all LOCKED “111” or anywhere in between.
In the playground there are two rows of five. The leftmost are both 111 and the front rightmost is 111 (all LOCKED). The back rightmost is 000, or all axes FREE. The front center three are each locked in two axes. These front three yellow boxes spin on a single axis and are arranged in the order of their FREE axis. From left to right of these front three, the free axis is X for the first box, Y for the second, and Z for the third.
The motion of the front three makes sense, they only rotate around their FREE axis.
But notice the motion of the back center three (one LOCKED axis) relative to the back right (all axes FREE). The back right freely spins in any direction in an expected manner. The center three have a funny occasional spin in them. My uninformed guess is that this has something to do with gimbal lock. The yellow boxes can all appear to be oriented in any rotation, but getting there with one locked axis imparts a funny occasional spin.
How can I visually show an angularly LOCKED or LIMITED axis when there doesn’t appear to be a one-to-one correspondence between “locked axis” and “no angular movement”?
(Additional discussion, progress, and development are in this thread, including visualizations of LINEAR locks/limits.)