CameraProject & aspect ratio
Blitz3D Forums/Blitz3D Programming/CameraProject & aspect ratio
| ||
Hi, I'm a bit confused as to how Blitzs Zoom works. I'm still trying to find a fast equivalent of CameraProject that doesn't clip values and noticed that even with a square screen/viewport, BBs own CameraProject returns non 1:1 aspect ratio values, any idea why it happens? I'd expect equal x,y returns from this but I get 281.6,230.4 Graphics3D 512,512,32,2 cam=CreateCamera() CameraViewport cam,0,0,512,512 CameraProject cam,2,2,20 Print ProjectedX()+","+ProjectedY() WaitKey End Cheers Tom |
| ||
Those results look right to me. I think you might be misunderstanding what CameraProject does: "Projects the world coordinates x,y,z on to the 2D screen." |
| ||
Hi, Quite right, need to subtract ProjectedY() from screenheight :) classic 'doh!' Tom |