GoblinPhysics icon indicating copy to clipboard operation
GoblinPhysics copied to clipboard

Use THREE.Euler.DefaultOrder = "YXZ" in exampleUtils.js

Open elisee opened this issue 9 years ago • 2 comments

The camera in the various demos (for instance, http://www.goblinphysics.com/examples/constraint-revolute.html) rotates in weird ways because the default "default Euler order" is set to "XYZ" in Three.js. By adding:

THREE.Euler.DefaultOrder = "YXZ";

at the start of exampleUtils.js, it should fix the issue and your camera will stay parallel to the ground.

elisee avatar Jun 17 '15 04:06 elisee

Thanks for the tip! I think some of the demos lose effect if they can't rotate freely along all axes. However, it makes sense for others such as the one you linked. I'll give it some thought.

chandlerprall avatar Jun 21 '15 22:06 chandlerprall

Three now has an OrbitControls class which keeps the camera's Y axis stable.

chandlerprall avatar Jan 12 '16 04:01 chandlerprall