gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

DS development > object translation not working?

#100767 - Rajveer - Wed Aug 30, 2006 12:42 pm

hi. im programming for the nintendo ds. i have my own 4x4 matrix called transmatrix which i used for translations and rotations of a specific object. i move the object around by editing transmatrix[12], transmatrix[13] and transmatrix[14] (the translation vector). i also use a gluLookAt function to look at these coords, and to position the camera behind the object (these coords +- a certain value). however, the more i move the object in any axis, the more the object moves from the centre of the screen, and its possible to move the object so it wont be on the screen even though the camera is looking at its coords. ive done a test and figured that the camera actually looks at the correct translation vector (transmatrix[12], transmatrix[13], transmatrix[14]) but the object deviates from these coords, as if the object is slowly creeping away from these coords until it goes off the screen.

anybody got any ideas?