RujiK
Member
I'm using a custom 3d camera in a 2d looking game. The camera works fine UNLESS I move beyond 1000 pixels to the right, and then I get a weird seam in the ground and everything is raised by one pixel:
I'm guessing every tile is slowly building up a fraction as I go to the right until it adds up to more than 1. I've tried using a custom view matrix as well as matrix_build_lookat, but both give these seams (although in different x positions.)
I've tried randomly adding +/- 0.01 to each value in the matrix but it just seams to move the seam around, nothing can eliminate it.
Can anyone help? This has me stumped. (Generous upvotes for your time if that is any incentive.) Thanks!
I'm guessing every tile is slowly building up a fraction as I go to the right until it adds up to more than 1. I've tried using a custom view matrix as well as matrix_build_lookat, but both give these seams (although in different x positions.)
Code:
[1.0 0.0 0.0 0.0]
_matrix = [0.0 0.707 -0.707 0.0]
[0.0 0.707 0.707 0.0]
[x y z 1.0]
0.707 = cos(45), sin(45)
...or like this:
_matrix = matrix_build_lookat(cam_x,cam_y ,cam_z ,
cam_x,cam_y - 16,cam_z + 16, 0, 1, 0)
///Draw event
matrix_set( matrix_view, _matrix );
Can anyone help? This has me stumped. (Generous upvotes for your time if that is any incentive.) Thanks!