Y
yearspassing
Guest
So this is a bit weird.
I created a new project and didn't write any code. I just created an object that creates a simple effect when I press a button.
effect_create_above(ef_explosion, 400, 400, 2, c_red);
Simple enough?
Then I add a camera. I follow the docs and I write this.
Then I use the same object and the explosion doesn't happen. If I change the code to effect_create_below(), the effect is being drawn.
As if the camera code somehow messed up with the depth system.
To further test this stuff I've created two objects (not simultaneously ofc hence the same coords):
The first one with the negative depth doesn't show and the second one shows fine.
Im completely lost.
I created a new project and didn't write any code. I just created an object that creates a simple effect when I press a button.
effect_create_above(ef_explosion, 400, 400, 2, c_red);
Simple enough?
Then I add a camera. I follow the docs and I write this.
Code:
viewmat = matrix_build_lookat(640, 240, -10, 640, 240, 0, 0, 1, 0);
projmat = matrix_build_projection_ortho(640, 480, 1.0, 32000.0);
camera_set_view_mat(view_camera[0], viewmat);
camera_set_proj_mat(view_camera[0], projmat);
As if the camera code somehow messed up with the depth system.
To further test this stuff I've created two objects (not simultaneously ofc hence the same coords):
Code:
instance_create_depth(400, 400, -10, Pigeon);
instance_create_depth(400, 400, 10, Pigeon);
Im completely lost.