Opposite of CameraProject?

BlitzMax Forums/MiniB3D Module/Opposite of CameraProject?

siread(Posted 2007) [#1]
Is there a way of taking the screen co-ordinates of the mouse and converting them to the 3D co-ords? I simply want to place a cursor sprite on the ground that can be moved with the mouse.

By the way Simon, I'm still doing this with CameraProject...

CameraProject(camera, camX, camY, -camZ)
Local px:Int = ProjectedX()
Local py:Int = ScreenH-ProjectedY()

It's not that important, but is there any chance you could fix the CameraProject in the next release? :)


Beaker(Posted 2007) [#2]
Not sure about in miniB3D, but in Blitz3D you would do a CameraPick() onto an invisible plane (or ground or terrain). Fairly simple.


simonh(Posted 2007) [#3]
Yep, what Beaker said.

The Projected bug was fixed in 0.42.


siread(Posted 2007) [#4]
Damn, I never updated! Cheers guys.