Continued working with user interactions today, and the focus was on the swipe gestures to rotate the 3D model that Zac has imported. I was able to get the up, down, right and left rotations up fairly quickly. However, that was not what I wanted. I was only either able to rotate up and down, OR right and left. If for example, I do a right rotation followed by an up rotation, the model goes haywire. It does not rotate properly.
I then moved on to find out how to do simultaneous rotations on both the x and y axes. From there, I looked into matrices as they are the ones controlling the model's transformations. I had a little knowledge on matrices as I took additional maths in secondary school, but I was not very good at it. Did some research by reading through the explanations on iphonedevelopment.blogspot.com blog and the OpenGL ES redbook. Got to understand matrices a bit more, and managed to improve the rotations. There is still some faults here and there though. Have to look into matrices more tomorrow!
No comments:
Post a Comment