I started to look for way of rotation the camera and then came across a post to say that in opengl es there issn't such thing of a camera in the first place. User is viewing at the 0,0,0 by default but because we applyed some transformation to the modelview like lookat and translate therefore the view changes. And this is also our so call camera. With this, i knew that i should also perform my rotation here to apply the rotation matrix to all the 3D object in the modelview scene.
I try using glrotate here before the push and pop matrix its call, but nothing seems to change. I still think that it is the correct 1, so i explore the rotation perform by the POD tutorial on all the object. I found that that they have their own build in rotation to be perform on the model matrix. Apply this rotation matrix at the same place, i finally manage to get the whole object to rotate together at the same axis. However the by using UISwipegesture, the rotation is quite stiff that doesn't feel nice in the user point of view. So i decided to change to UIPangesture to do the rotation.
No comments:
Post a Comment