Skip to content

vdenisenko-waverley/Three.js-Object-Rotation-with-Quaternion

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Three.js-Object-Rotation-with-Quaternion

Example of rotating an object, not camera, using quaternion rotation.

I was looking for ways to rotate an object, not the camera, in a 3d scene using a trackball like control. I found code on StackOverflow which was very close to what I was looking for. This is that example code updated to work more like I wanted.

The rotation now works as I expect. Phew.

Now with momentum Try spinning the cube fast.

Putting this code out there in case it helps anyone or could be improved.

View an example here: http://projects.defmech.com/ThreeJSObjectRotationWithQuaternion/

About

Rotate an object, not camera, using quaternion rotation.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%