Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Disappearing object behind glass and solid rotated rects.

edited July 2013 in Questions Posts: 105
  1. I have began with simple/primitive 3D and when I create a window and look through it, some of the translated and rotated rects disappears. It's irritating sometimes, but.. So I wonder if its a way to not make those objects disappear? Im using fill for the glass.

  2. When I create a ground in 2D and want it solid, then i figure out if the player x is between the ground width and player y is between the ground height. And if it is so then i change the y of the Player. Thats working nice both in 2D and 3D. But if I rotate the ground 45 degrees, how do I make it solid then? And no, I am not using physics.


  • Posts: 455

    Drawing 3d can make object dissappear behind transparent (alpha'd) things if the draw order is wrong. Basically if you draw the transparent object before the objects behind it they won't appear.

    You can either, order all your meshes by distance from the camera and draw the furthest ones first. Or a potentially simpler approach (although maybe less accurate in some situations) is draw all non transparent objects before your transparent objects.

  • Posts: 105

    Thanks, see what I did wrong

  • IgnatzIgnatz Mod
    Posts: 5,396

    Even then, you can get flickering. What I do then is use a shader to discard transparent pixels.

Sign In or Register to comment.