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

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

java - Using an Integer ArrayList in Android -