Jump to content
  • Advertisement
Sign in to follow this  
chippolot

3D objects in 2D HUD??

This topic is 4444 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

So, I developed a HUD system for my school game which works on screen percentages. For example an object of dimensions {.5,.5} would have width and height of half the screen dimensions. Also, an object positioned at {.25,.25} would lie a quarter from the top and a quarter from the left side of the the screen. Given this input scheme, I'm looking for a good way to get 3D objects onto the screen. They show up, but they have no perspective. How can I impose some sort of perspective projection given coordinates from ranging from 0 to 1 ?

Share this post


Link to post
Share on other sites
Advertisement
To be able to have a 3d object, you have to have three dimensions - right now you only have two, the x and y screen space. If you are actually rendering 3d objects for your gui, then just altering the perspective transform is what you would do.

Otherwise, if you are just rendering 2d objects like boxes (which I suspect you are) then maybe you could apply a texture to them that makes the objects appear to have depth? How fancy are thinking of getting - you could use shaders to really make the objects do whatever you want.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!