Terrain Editor Mouse Position Problem

Blitz3D Forums/Blitz3D Programming/Terrain Editor Mouse Position Problem

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.

Um, That would only work if you don't move the camera. try this:

(assuming terrain is the handle of your terrain)
;In the start of the program ,after creating the terrain:
EntityPickMode terrain,2

;In your editer's loop, do this to find the coordinates on the terrain the mouse is at:
CameraPick camera,MouseX(),MouseY()	;Assuming camera is your camera's handle
If PickedEntity()=terrain Then  
 x#=PickedX#()
 y#=PickedY#()
 z#=PickedZ#()
EndIf