{"action":"created","issue":{"url":"https://api.github.com/repos/Rajawali/Rajawali/issues/1574","repository_url":"https://api.github.com/repos/Rajawali/Rajawali","labels_url":"https://api.github.com/repos/Rajawali/Rajawali/issues/1574/labels{/name}","comments_url":"https://api.github.com/repos/Rajawali/Rajawali/issues/1574/comments","events_url":"https://api.github.com/repos/Rajawali/Rajawali/issues/1574/events","html_url":"https://github.com/Rajawali/Rajawali/issues/1574","id":130270329,"number":1574,"title":"quaternion rotation issue","user":{"login":"sanuksoman","id":4980413,"avatar_url":"https://avatars.githubusercontent.com/u/4980413?v=3","gravatar_id":"","url":"https://api.github.com/users/sanuksoman","html_url":"https://github.com/sanuksoman","followers_url":"https://api.github.com/users/sanuksoman/followers","following_url":"https://api.github.com/users/sanuksoman/following{/other_user}","gists_url":"https://api.github.com/users/sanuksoman/gists{/gist_id}","starred_url":"https://api.github.com/users/sanuksoman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sanuksoman/subscriptions","organizations_url":"https://api.github.com/users/sanuksoman/orgs","repos_url":"https://api.github.com/users/sanuksoman/repos","events_url":"https://api.github.com/users/sanuksoman/events{/privacy}","received_events_url":"https://api.github.com/users/sanuksoman/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-02-01T06:23:48Z","updated_at":"2016-03-03T16:43:49Z","closed_at":null,"body":"I successfully rendered a 3D model using the Rajawali library in my application.\r\nI used quaternion data (x,y,z,w) for rotation and flipping.\r\nThe rotation is perfect for the front face and when I flip it to the opposite face the rotation becomes opposite to the actual direction.\r\nWhat I mean with \"on the opposite face\", is that when I rotate to right, the cube rotates to left and vice-versa.\r\n\r\nThe code I used: \r\n  ```\r\n @Override\r\n        protected void initScene() {\r\n            try {\r\n                mLight = new DirectionalLight(0.1f, 0.2f, -1.0f);\r\n                mLight.setColor(1.0f, 1.0f, 1.0f);\r\n                mLight.setPower(1);\r\n                getCurrentScene().addLight(mLight);\r\n                getCurrentScene().setBackgroundColor(0xffffff);\r\n                LoaderOBJ objParser = new LoaderOBJ(mContext.getResources(),\r\n                        mTextureManager, R.raw.device_obj);\r\n                objParser.parse();\r\n                m3dObjectCube = objParser.getParsedObject();\r\n                m3dObjectCube.setScaleX(.08f);\r\n                m3dObjectCube.setScaleY(.08f);\r\n                m3dObjectCube.setScaleZ(.08f);\r\n                getCurrentScene().addChild(m3dObjectCube);\r\n                getCurrentCamera().setZ(7);\r\n                Material material = new Material();\r\n                material.enableLighting(true);\r\n                material.setDiffuseMethod(new DiffuseMethod.Lambert());              \r\n            } catch (Exception e) {\r\n                e.printStackTrace();\r\n            }\r\n        }\r\n```\r\n\r\nFor Rotation \r\n  ```\r\nm3dObjectCube.setRotation(new Quaternion(event3D.getW(), event3D.getX()\r\n                        , event3D.getY(), event3D.getZ()));\r\n```"},"comment":{"url":"https://api.github.com/repos/Rajawali/Rajawali/issues/comments/191847058","html_url":"https://github.com/Rajawali/Rajawali/issues/1574#issuecomment-191847058","issue_url":"https://api.github.com/repos/Rajawali/Rajawali/issues/1574","id":191847058,"user":{"login":"jwoolston","id":2993125,"avatar_url":"https://avatars.githubusercontent.com/u/2993125?v=3","gravatar_id":"","url":"https://api.github.com/users/jwoolston","html_url":"https://github.com/jwoolston","followers_url":"https://api.github.com/users/jwoolston/followers","following_url":"https://api.github.com/users/jwoolston/following{/other_user}","gists_url":"https://api.github.com/users/jwoolston/gists{/gist_id}","starred_url":"https://api.github.com/users/jwoolston/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jwoolston/subscriptions","organizations_url":"https://api.github.com/users/jwoolston/orgs","repos_url":"https://api.github.com/users/jwoolston/repos","events_url":"https://api.github.com/users/jwoolston/events{/privacy}","received_events_url":"https://api.github.com/users/jwoolston/received_events","type":"User","site_admin":false},"created_at":"2016-03-03T16:43:49Z","updated_at":"2016-03-03T16:43:49Z","body":"What class is `event3D` an object of and are you certain it is using the same coordinate system?"}}