Jump to content
  • Advertisement
Sign in to follow this  
MotherGreen

2D - 3D Transformation

This topic is 5083 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! Actually I am using the equation below to calculate the projected coordinates 2DVertex = (mWorld * mCamera * mProjection ) * 3DVertex and it performs well, but in a special case there are problems! For example the camera is placed inside a cube near to a corner and looks into the cube, the coordinates (corner) of the vertices placed behind the camera are projected to the wrong coordinates onto the view plane. All other vertices are projected to the right coordinates. Is there an other way to get the projected coordinates? Thanks

Share this post


Link to post
Share on other sites
Advertisement
Would D3DXVec3Project() by any chance help? I suppose all it really does, though, is precisely what you already do (with the additional necessity of a viewport)...

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!