Or you can use the 3D collision commands. Create a plane at the level of your tanks, do a raycast from the camera position + the screenTo3D vector commands and get a real 3D point from the raycast to point at. Simple.
Here's a function you could easily edit:
function getHitFromScreen(obj as integer, x as float, y as float, range as float)
vx3d# = Get3DVectorXFromScreen(x, y)
vy3d# = Get3DVectorYFromScreen(x, y)
vz3d# = Get3DVectorZFromScreen(x, y)
tx# = getCameraX(1) + vx3d# * range
ty# = getCameraY(1) + vy3d# * range
tz# = getCameraZ(1) + vz3d# * range
hit = ObjectRayCast(obj, getCameraX(1), getCameraY(1), getCameraZ(1), tx#, ty#, tz#)
endfunction hit
Used like this:
if getHitFromScreen(planeObjectID, getPointerX(), getPointerY(), 10000)>0
x# = GetObjectRayCastX(0)
y# = GetObjectRayCastY(0)
z# = GetObjectRayCastZ(0)
endif