{"issue":{"milestone":null,"user":{"id":1263749,"login":"sushant24","url":"https://api.github.com/users/sushant24","avatar_url":"https://secure.gravatar.com/avatar/058f584724c770808c429d339a56c1a7?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"058f584724c770808c429d339a56c1a7"},"created_at":"2011-12-14T19:23:07Z","title":"Object.rotation's axis of rotation","updated_at":"2011-12-19T07:43:13Z","labels":[],"state":"open","id":2556684,"html_url":"https://github.com/mrdoob/three.js/issues/910","closed_at":null,"pull_request":{"patch_url":null,"html_url":null,"diff_url":null},"body":"Does changing the value of an object's rotation property rotate the object about the world axes or the object's axes? For eg \r\nobject.rotation.x += 2.\r\nWill this rotate the object about the world X axis or the object's X axis?\r\nI tried the following example :\r\n\r\nvar materials = []; \r\nmaterials.push( [ new THREE.MeshBasicMaterial( { color: 0xff0000 } ) ] );\r\nmaterials.push( [ new THREE.MeshBasicMaterial( { color: 0xff0000 } ) ] );\r\nmaterials.push( [ new THREE.MeshBasicMaterial( { color: 0x00ff00 } ) ] );\r\nmaterials.push( [ new THREE.MeshBasicMaterial( { color: 0x00ff00 } ) ] );\r\nmaterials.push( [ new THREE.MeshBasicMaterial( { color: 0x0000ff } ) ] );\r\nmaterials.push( [ new THREE.MeshBasicMaterial( { color: 0x0000ff } ) ] );\r\n\r\nobject = new THREE.Mesh( new THREE.CubeGeometry( 20, 20, 20, 1, 1, 1, materials ), new THREE.MeshFaceMaterial() );\r\n\r\nobject.position.x = 0;\r\nobject.position.y = 0;\r\nobject.position.z = 0;\r\n\r\nobject.rotation.x = 0;\r\nobject.rotation.y = 0;\r\nobject.rotation.z = 0;\r\n\r\nobject.scale.x = 1;\r\nobject.scale.y = 1;\r\nobject.scale.z = 1;\r\n\r\nscene.add( object );\r\n\r\nAfter i have added the object to the scene i tried the following - \r\nobject.rotation.x += Math.PI/4;\r\nobject.rotation.y += Math.PI/4;\r\nobject.rotation.z += Math.PI/4;\r\n\r\nUntil now the object rotates with respect to its own X,Y and Z axes.\r\nbut doing : object.rotation.x += Math.Pi/4;\r\nnow rotates the object 45 degrees about the World X axis instead of the object's X axis.","number":910,"url":"https://api.github.com/repos/mrdoob/three.js/issues/910","comments":2,"assignee":null},"comment":{"user":{"id":1263749,"login":"sushant24","url":"https://api.github.com/users/sushant24","avatar_url":"https://secure.gravatar.com/avatar/058f584724c770808c429d339a56c1a7?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"058f584724c770808c429d339a56c1a7"},"created_at":"2011-12-19T07:43:13Z","updated_at":"2011-12-19T07:43:13Z","id":3200216,"body":"Yes, It works great. Thank You :)","url":"https://api.github.com/repos/mrdoob/three.js/issues/comments/3200216"},"action":"created"}