Jump to content
  • Advertisement
Sign in to follow this  
san__gohan

Writing text in 3d coordinates

This topic is 4722 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

Hello, I would like to draw some text from which I only have 3D coordinates. What should be done to transform these coordinates in screen coordinates (because the font class only alows screen coordinates). For example, the Line helper class makes it easy to draw a line given its 3D coordinates and the world/view/proj matrix thanks to the drawTransform function, but I couldn't find a similar function for text. Thanks!

Share this post


Link to post
Share on other sites
Advertisement
Use the function D3DXVec3Project and insert the current matrices and viewport. Note that the GetTransform and GetViewport function do not give results on pure devices.

Simply insert your 3d point, the matrices and the viewport and you get the screen coordinates.

Share this post


Link to post
Share on other sites
Quote:
Original post by Endurion
Use the function D3DXVec3Project and insert the current matrices and viewport. Note that the GetTransform and GetViewport function do not give results on pure devices.

Simply insert your 3d point, the matrices and the viewport and you get the screen coordinates.


Thank you, it works. ;)

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!