Author Topic: 3D Model is before the HUD  (Read 4529 times)

AlenGaming

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 3
    • View Profile
3D Model is before the HUD
« on: July 07, 2014, 02:47:00 PM »
My Weapon is before the GUI (HUD) how i can my that the HUD is before the Weapon?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: 3D Model is before the HUD
« Reply #1 on: July 08, 2014, 11:02:57 AM »
By default when you create a new UI with NGUI, it will be on top of your 3D. The draw order is determined by the depth of the cameras. UI camera is drawn after the game camera by default.

AlenGaming

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 3
    • View Profile
Re: 3D Model is before the HUD
« Reply #2 on: July 08, 2014, 01:06:53 PM »
Sorry but i dont know how to fix that i have 2 cameras.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: 3D Model is before the HUD
« Reply #3 on: July 08, 2014, 01:15:43 PM »
"Depth" setting on the cameras. It's not an NGUI question -- consult Unity's documentation for cameras and how the draw order works.

AlenGaming

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 3
    • View Profile
Re: 3D Model is before the HUD
« Reply #4 on: July 08, 2014, 05:54:33 PM »
Thanks ArenMonk it worked!