overte-thingvellir/scripts
Leander Hasty fa74fbc986 [Case 6491] fixes rotation skip near 0 and 180.
Previously, when rotating, it would be easy to achieve 1 degree granularity, except near the 0 degree and 180 degree "poles", where it would often e.g. jump from 10 to -10, or 174 to -175, or similar.

yawZero/pitchZero/rollZero were all based on the yawHandle/pitchHandle/rollHandle ray intersection, and were not necessarily coplanar with rotateOverlayTarget. As a result, centerToZero didn't lie on the expected plane, while centerToIntersect did.  This had the effect of distorting the rotation range.

We also have a possible issue in here with editOverlay(rotationOverlayTarget,{rotation:...}) not taking effect immediately.  Better to take the existing ray and cast against a known plane, as e.g. translateXZTool and such do.  No risk of stale rotation in that case.

This also cleans up rotationHelper args a bit to avoid some string switches and keep flow a little more readable.

TODO: propagate ray-plane test to helperRotationHandleOnMove rather than relying on ray hit location; normalize onBegin/onMove/etc across all tools to take queryRay and results args to avoid recreating the ray.

Reviewed-by: LaShonda Hopper <lashonda@1stplayable.com>
2017-09-28 15:04:27 -04:00
..
developer Fixed things 2017-09-20 23:23:30 +01:00
modules request module updates 2017-05-03 07:32:23 -07:00
system [Case 6491] fixes rotation skip near 0 and 180. 2017-09-28 15:04:27 -04:00
tutorials Merge branch 'master' into midi 2017-07-26 13:59:07 -07:00
defaultScripts.js Squashed commit of the following: 2017-08-25 11:45:37 -07:00