Hi Gibbon28, a Derbyshire lad eh? I'm just outside Derby
You can use Get3DVectorXFromScreen and the Y&Z versions to get a unit vector from the camera position towards the point in 3D. If you multiply these by a distance you will get a point in space in that direction.
If you use the camera position and the camera position PLUS the vectors you just made with a raycast it should return the objects you are expecting.
I did find a bug which was returning the first object detected every time which Paul has since fixed (should be in Beta v1086 just released).
Here is a "simple" example of using this method of detection using the mouse position:
function cursorObject(range as float)
PX = getPointerX()
PY = getPointerY()
ux# = Get3DVectorXFromScreen(PX,PY)
uy# = Get3DVectorYFromScreen(PX,PY)
uz# = Get3DVectorZFromScreen(PX,PY)
x1# = getCameraX(1)
y1# = getCameraY(1)
z1# = getCameraZ(1)
x2# = x1# + ux# * range
y2# = y1# + uy# * range
z2# = z1# + uz# * range
obj = ObjectRayCast(0, x1#, y1#, z1#, x2#, y2#, z2#)
endfunction obj
this.mess = abs(sin(times#))