K
Kevin_Hahn
Guest
Hello,
I'm making a 3D platform game. I am not using 3D functions, as I am unfamiliar with them. Instead, I'm using some draw functions to project sprites into 3D with my own functions. As of now, I'm calculating the depth of a block (and all other objects) by the distance from the center of the view:
The problem that arises from this method is depicted in these two pictures:
In both of these examples, the depth overlap is caused by one of the blocks being off the regular grid.
However, if I build a level to a block-sized grid, the depth performs just fine:
I could just build my level to a grid, but I really want to add lifts and other things.
Any help would be great!
I'm making a 3D platform game. I am not using 3D functions, as I am unfamiliar with them. Instead, I'm using some draw functions to project sprites into 3D with my own functions. As of now, I'm calculating the depth of a block (and all other objects) by the distance from the center of the view:
Code:
var xd,yd;
xd=abs(x-global.view_x);
yd=abs(y-global.view_y);
depth=(xd+yd);
In both of these examples, the depth overlap is caused by one of the blocks being off the regular grid.
However, if I build a level to a block-sized grid, the depth performs just fine:
I could just build my level to a grid, but I really want to add lifts and other things.
Any help would be great!
Attachments
-
10.3 KB Views: 21
-
12.8 KB Views: 23
-
21.4 KB Views: 17