three.js - threejs rotation by x and z works individually but fails together -


i need rotate diamonds (see attachement) around x , z axis. when rotating individually (meaning set rotation.x or rotation.z) rotation looks fine , works. when set both rotations (x , z) rotation looks this:

diamond rotation fail

do miss something? somehow object local coordinate system rotated , rotation around 2 axes fail?

diamond.position = brilliantpositions[i][0]; diamond.rotation = brilliantpositions[i][1]; this.frames.arrangementmesh.add(diamond); 

thanks in advance hint kind regards roman , patrick

the euler order indeed solved problem us. in our case had follwing

diamond.eulerorder = 'zyx'; 

in order have calculation take right way. many thanks!

here's more information euler order

ps: couldn't accept comment answer westlangley therefore upped , reposted solution here


Comments

Popular posts from this blog

user interface - Python attempting to create a simple gui, getting "AttributeError: 'MainMenu' object has no attribute 'intro_screen'" -

jquery - Common JavaScript snippet to share files on Google Drive, Dropbox, Box.net or SkyDrive -

Android Gson.fromJson error -