3d weapon model in HUD?

Started by hvor, September 20, 2005, 08:52:00

Previous topic - Next topic

hvor

I'm wondering if anyone tried (and perhaps succeded) to place a 3d model of a weapon in HUD. So, a fixed model instead of just an image of it. I encoutered difficulties: model of weapon updates position every frame from camera position and places itself just in front of camera, but I found that bad soulution - model is "shaking" up and down too much. I need fixed model, that is (updating position every frame) obviously not the way to do that.
I need something like placing an image in ortho mode on screen, but in this case it should be an 3d model. Since it have 3d (z too), it can't be displayed in ortho mode.
Any suggestions?  :roll:
b]Hvor Games[/b]

hvor

OK, the solution was simple, but not obvious to me in the first time:
glPushMatrix();      // store matrix state
  glLoadIdentity(); // reset matrix
  drawHudModel();   // draw model in appropriate location
glPopMatrix();       // restore matrix state
b]Hvor Games[/b]