'Drag' Scrolling in 3D

Blitz3D Forums/Blitz3D Programming/'Drag' Scrolling in 3D

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.

Its possible to map 3D X and Y positions to the 2D mouse X and Y positions.

I did this ages ago. If I recall, what I did was set my camera position and then Projected the 3d point to the 2d screen, then projected a second point +1x, +1y to get a ratio between the 3d single point movement and the 2d movement. Then you just need to flip it 1.0/DeltaX# 1.0/deltaY# to get your ratio from 2D to 3D. This has limited use though because if you move the camera you have to re-project it but if thats what you need its possible.

If your just wanting the camera to move with the mouse in the 3d world which is the recommended way of doing it then just use the MouseXspeed(), MouseYSpeed() on the camera movement commands.