Anixias
Member
I am using vertex buffers to create and store primitives and models, but whenever I use vertex_submit, the entire vertex buffer is rendered at a single depth, in the order I submit them. This means that nothing can really phase-through anything else. It's not too hard to set objects at the correct depth, but the individual vertices of two separate vertex buffers do not have world-depth. The vertex_buffer itself has one depth. Everything within the vertex buffer uses Z Testing properly, but not multiple separate vertex buffers. My only solution would be to render everything into one vertex buffer, but then, how would textures work?
Here, all of these spheres have a z of 0, and a depth of 10:
EDIT:
Using
depth = point_distance_3d(x,y,z,obj_world.camx,obj_world.camy,obj_world.camz);
on the spheres definitely helps, however, the spheres do not actually collide with each other. I need them to actually go through each other.
Here, all of these spheres have a z of 0, and a depth of 10:
EDIT:
Using
depth = point_distance_3d(x,y,z,obj_world.camx,obj_world.camy,obj_world.camz);
on the spheres definitely helps, however, the spheres do not actually collide with each other. I need them to actually go through each other.
Last edited: