Sunday, 18 September 2011

Second Code - Making The 3D Box Move


The next stage was to make the box move with the mouse.
After a bit of experimenting with the placement of the mouseX and mouseY functions i began to understand what effects what when functions were placed in curtain parts of the code.
In order for me to be in control of the cube i need to place the mouseX and mouseY functions in the translate part of the code. But i experienced a problem with the cube spinning exceedingly fast when it was moved. To fix this i had to times the rotateX and rotateY by 0.01. This reduced the spinning considerably.

No comments:

Post a Comment