2D to 3D Cordinates and vice versa

Blitz3D Forums/Blitz3D Programming/2D to 3D Cordinates and vice versa

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

When you want to convert 2d-to-3d you need to set the Z value. The function that has been posted above is from BlitzSupport from the code archives, so it takes the screen x,y parameters and put the object in front of the camera so the object is in the same x,y to the given point and the Z is selected to the needed value.

Try it for yourself positioning an object in the x,y mouse values. Very nice code!

P.D: It doesn't work with ortographic projection (as lot of things that don't work neither).