{"action":"closed","issue":{"url":"https://api.github.com/repos/Rajawali/Rajawali/issues/1214","labels_url":"https://api.github.com/repos/Rajawali/Rajawali/issues/1214/labels{/name}","comments_url":"https://api.github.com/repos/Rajawali/Rajawali/issues/1214/comments","events_url":"https://api.github.com/repos/Rajawali/Rajawali/issues/1214/events","html_url":"https://github.com/Rajawali/Rajawali/issues/1214","id":30691757,"number":1214,"title":"Problem in Camera Rotation v0.9","user":{"login":"detonator123","id":7107693,"avatar_url":"https://avatars.githubusercontent.com/u/7107693?v=3","gravatar_id":"","url":"https://api.github.com/users/detonator123","html_url":"https://github.com/detonator123","followers_url":"https://api.github.com/users/detonator123/followers","following_url":"https://api.github.com/users/detonator123/following{/other_user}","gists_url":"https://api.github.com/users/detonator123/gists{/gist_id}","starred_url":"https://api.github.com/users/detonator123/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/detonator123/subscriptions","organizations_url":"https://api.github.com/users/detonator123/orgs","repos_url":"https://api.github.com/users/detonator123/repos","events_url":"https://api.github.com/users/detonator123/events{/privacy}","received_events_url":"https://api.github.com/users/detonator123/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Rajawali/Rajawali/labels/Support","name":"Support","color":"02e10c"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":13,"created_at":"2014-04-02T14:22:38Z","updated_at":"2015-03-30T21:07:42Z","closed_at":"2015-03-30T21:07:42Z","body":"I need to give a complete 360 degree view in my live wallpaper so that the user can have a view in any direction of his choice. I was able to implement this very easily in Master branch just by using these 2 lines:\r\n\r\nsetLookAt(0,0,0);\r\nmCamera.setRotation(0,xOffset,yOffset);\r\n\r\nBut then I switched to v0.9 branch and now the above code doesn't work. So,to find out the problem,I tried to check out rotation individually along each axis. I used \r\n\r\nsetRotY(xOffset)\r\nmCamera.setLookAt(0,0,0);\r\n\r\nto rotate my camera along Y axis based on x axis swipe. But instead of rotating Camera around Y axis keeping my focus on origin, the camera started to rotate around an Axis parallel to Y axis but passing a bit above the location of my camera. Say my camera is at 0,0,6 so it started rotating around an axis parallel to Y but passing through 0,0,8.\r\n\r\nSo instead of using the rotate function, I thought of calculating co-ordinates and changing position of camera. I used,\r\n\r\nmCamera.setPosition(6*(float) Math.sin(Math.toRadians(xOffset)),0,6*(float) Math.cos(Math.toRadians(xOffset)));\r\n\r\nThis code worked well while rotating on in horizontal plane ie about Y axis and I got complete 360 degree rotation but while using same approach along Y axis I got perfect rotation upto 90 degree(offset) but just above that, my Camera suddenly got inverted. So say at 89 degree the camera is looking from top of origin then just at above 90, say 91 the camera went below the origin. What could really be the issued behind this inversion?\r\n\r\nAnd how can I rotate the camera along both axes X and Y so that the user is free to move his view in any direction? \r\n     \r\n\r\n"}}