Well back to the topic, today was to fix the rotation by changing from the original swipe gesture to UIPangesture. It was not that difficult to rotate the whole model view matrix for the whole 3d object as i already manage to create the iVar and other, just have to get and set according to the translation of view.
However, for the individual node, as method and the UISwipeGesture was being done previously, there was quite alot to change to make use of this UIPanGesture matrixes. At first i manage to get the object rotate at the correct direction but the speed of the rotation is too much. I do not really understand what the reason at first because i did += the new value minus the old value which should not give any problem. But after more debugging and thinking i finally found the error with this that will only work for the first two step. So i fixed it.
The remaining of the day i spent trying to fix the modelframe animation as the sudden end of the animation and start doesn't look good at all. It seems to make the object jump from one frame to another frame without smooth transition. Manage to implement a pause and play function for the frame to have it connected to the last stop frame.
No comments:
Post a Comment