Archived

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

Boops

3D Line

Recommended Posts

This is NOT a double post This is about a 3D line, the other about a 2D line I''m making a software 3D engine, I started with points and that works nice (expecially flying through a cube made of 100000 points is cool!), now I''m doing lines and that''s working fine except for one thing: If one endpoint of the line is in front of the camera and the other one is behind it, something goes wrong with the projection, and the line gets the wrong direction. What can I do about this, or in other words how do I have to project this endpoint onto the screen if it''s behind the camera? Thanks a lot.

Share this post


Link to post
Share on other sites
I''ve never done that before, but I assume you have to calculate the intersection of the line with your near plane and use that point instead of the point behind of the camera

Share this post


Link to post
Share on other sites