CameraViewport

Blitz3D Forums/Blitz3D Programming/CameraViewport

I would rely on some nifty variables along the lines of:

gwidth=GraphicsWidth()
gheight=GraphicsHeight()

camX=(gwidth/4)
camY=(gheight/4)
camHeight=(gheiht/2)
camWidth=(gwidth/2)

cam_ratio# = (1 / ((Gwidth/camX) * (Gheight/camY)))

;camX,camY= Top Left cameraView
;CamX+camWidth,CamY+CamHeight= Bottom Right cameraView



So what would be at x,y on normal 2D screen would be:

Rect camX+(x*cam_ratio#),(CamY*cam_ratio#),XX * cam_ratio#, YY * cam_ratio#,1,1