Jump to content
  • Advertisement
Sign in to follow this  


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

I always see these complicated and poorly explained formulas for perspective projection, and I'm not sure if I'm doing it right. Let's say I have the 3d point a. Now let's say the new 2d screen coordinate is a2d. Is this code correct for converting the 3d point to 2d? Vertex2d a2d; a2d.x = a.x / a.z * SCREENWIDTH; a2d.y = -a.y / a.z * SCREENHEIGHT; a2d.x = a2d.x/2.0f + SCREENWIDTH/2.0; a2d.y = a2d.y/2.0f + SCREENHEIGHT/2.0; If not, what's wrong with it? Thank you.

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!