Archived

This topic is now archived and is closed to further replies.

TheeCrowe

Help with 2D in 3D using DirectX 8

Recommended Posts

I hope someone out there has run into this problem, and can give me a hand. I made a very basic 3D engine in DirectX 8 (Visual C). I now want to create HUD''s Menu boxes and displays, and have failed pretty bad so far. My three methods: 1. Try to get sprite''s to display as if the screen is a 2D area. 2. Try to arrange a 6-vertex Plane plane To always be infront of camera. 3. Trying to use BillBoard, at exactly .1 distance from camera. I can''t get sprites to even appear, The planes mat is always getting screwed up when the camera starts to turn in a complex matter. Finally Billboard I had the most success with, It just gets awkward in scaling situations. Has anyone found a better way that they are willing to share, or got one of the methods I''m try to use to work very nicely? Thank for any assistance you can give.

Share this post


Link to post
Share on other sites
Read the 2D article on this site.

The short story - don''t try to align the HUD as a billboard in front of the camera. Do this:

Draw 3D stuff
Switch to ortho matrix
Draw 2D stuff (as 2D, not billboarded 3D)
Switch back to 3D proj. matrix

rinse and repeat

Share this post


Link to post
Share on other sites