Jump to content


Photo

3d HUD problems


  • Please log in to reply
1 reply to this topic

#1 dmac1126

dmac1126

    GMC Member

  • New Member
  • 9 posts
  • Version:GM8

Posted 07 February 2012 - 03:24 PM

Ok so ive been working on this 3d Gta type game, and i cant seem to get the hud just right. Only the hud background draws, but under the floor. If i set it to a closer depth it doesnt show up at all. I used ortho projection and even tried some 3d drawing scripts. Im posting the gmk if anyone could take a look and see what i could do to make the hud work correctly.


3d_gta_type_game.gmk
  • 0

#2 BattleRifle BR55

BattleRifle BR55

    Moo

  • GMC Member
  • 8251 posts
  • Version:GM7

Posted 07 February 2012 - 03:32 PM

The typical order of drawing is as such

Perspective Projection
Environment
Orthographic Projection
Onscreen Elements.

You're drawing your ortho projection after some of your HUD elements, therefore they're still in the perspective projection. You should also make sure your camera object has the highest depth to avoid id issues.

Also, unless you store things like "global.gun = 1" in your global.gun variable which I of course highly doubt, that's not how you use a switch statement.
  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users