• Hey! Guest! The 40th (!!!) GMC Jam will take place between February 25th, 12:00 UTC to March 1st 12:00 UTC. Why not join in this very special anniversary jam! Click here to find out more!

3D [Solved!] Setting depth to a different not drawn object is making the first be drawn?

Dupletor

Member
Help! I don't even know how to describe it.

This is the result of my debugging process:
-If I remove the line of code
Code:
depth=0;
from the Enabler object, the balls will not be drawn.
-If I create the Enabler object once, they won't be drawn.
-I have to specifically create them every step, and the depth has to be set in a Creation event. It will not work in a Step event.
-Objects are still created and moving, they are just not drawn.


Draw event for the object in problem:
Code:
mat = matrix_build(x , y, z, 90, 90, angle_to_camera + 90, 1, 1, 1);
matrix_set(matrix_world, mat);
draw_sprite_ext(sprite_index,image_index,0,0,image_xscale,image_yscale,image_angle,image_blend, image_alpha);
matrix_set(matrix_world, matrix_build_identity());

What the hell is happening?
 
Last edited:

Dupletor

Member
Hmm, setting the balls depth to a negative value instead of 0 when instantiating made it work without the Enabler.
However, setting the depth to a negative value during Step or Creation event did not.
Why would that happen? Creating an invisible object with depth 0 should not change the behavior of the balls in depth in any way.
 
Last edited:
Top