[SOLVED]Draw Order Issues

edited December 2011 in Help request
Hello again! In short, I want to know if there is a way to make certain things always draw on top of the other objects (specifically the hud). I'd also have a problem if the background(when I add it) is drawn over the game field instead of behind it, which is why I need to know how to control draw order.

How may I control draw order?

Comments

  • edited December 2011
    Yes, that's called the depth or Z coordinate. :)
  • edited December 2011
    Disregard this post.
    Got it working, thanks!
  • edited December 2011
    It all depends on where your camera is and what it's frustum is (near and far values).

    A camera always look up the Z axis, ie. the bigger the Z values are, the further they are from the camera.

    If you have a Camera which position has Z = 10, and a Near = 2, Far = 100, then all the rendered objects have a Z that satisfy:
    12 < Z <= 102. Or, explicitly, CamZ + CamNear < Z <= CamZ + CamFar.

    You can only use positive values for CamNear/CamFar.
  • edited December 2011
    What's the default FrustrumNear?

    Right now, my camera has a Z of -1 and a FrustrumFar of 1, and the default FrustrumNear.

    What exactly do these three values do?
  • edited December 2011
    sonicbhoc wrote:
    What's the default FrustrumNear?

    0
    Right now, my camera has a Z of -1 and a FrustrumFar of 1, and the default FrustrumNear.

    What exactly do these three values do?

    It defines the frustum of the camera, ie the portion of space seen by the camera that verifies the equation written earlier.
Sign In or Register to comment.