Rendering with P3D and need kind of HUD-Display

edited October 2013 in How To...

Hi There, to become more familiar with P3D, I am coding a little Tank-Attack-Clone, what works really fine and doesn´t need much code. I even can position the camera by tracking locations with the ModelX()-Functionality. All Great.

BUT: I am used to print some text onto the screen with the text-function. Since I am now in 3D, this doesn´t work anymore: the texts, are now positioned in the 3D space, too. How can I get something like a HUD-Display for my 3D-Tank-Attack?

Thx,

Jens

Tagged:

Answers

  • As long as your using Procssing 2 the best/easiest way is to use the ControlP5 library of GUI controls. There's an option to display the controls over a 3D display and still interact with the 3D view. Check out the examples provided with the library and on their website for how it's done.

  • edited October 2013

    there are tricks to do it. check the old forum. code:

          //here comes all 3D stuff
          //.....................
          //here comes all 2D stuff (the HUD)
          camera();
          hint(DISABLE_DEPTH_TEST); 
          text ("Fixed", 30, 30);
    

    greetings!

  • Thank you guys! There's no mail-notification, so I wasn't aware, you answered already... I want to avoid controlp5, so I try chrisir's Suggestion - if I understand it... Jens

Sign In or Register to comment.