Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
elisee opened this issue Jun 17, 2015 · 2 comments
Open

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

elisee opened this issue Jun 17, 2015 · 2 comments
Labels

Comments

@elisee
Copy link

elisee commented Jun 17, 2015

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.

@chandlerprall
Copy link
Owner

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
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants