Here is how I have it. This code is not tested as it's currently being converted from DBP, but the principle is there.
1. Make a cone for the mouse...
gMouse.cursor = New DarkGDK.Basic3D.Cone(dSize, System.Drawing.Color.White)
gMouse.cursor.Limbs(0).Offset(dSize * 0.5, 0, 1)
gMouse.cursor.XRotate(180)
gMouse.cursor.FixPivot()
gMouse.cursor.Culled = False
gMouse.cursor.Fade(200)
2. This bit checks for mouse movement. cx and cy are populated with MouseMoveX and MouseMoveY. It uses pickobject to get the point on my terrain, and also records the change in position in terrain terms, rather than 2D mouse terms. The camera can be up to 5000 units away from the terrain, it can be fine tuned for performance if necessary.
If gMouse.cx <> 0 Or gMouse.cy <> 0 Then
mouseMoved = 1
gMouse.oldX = gMouse.cursor.X
gMouse.oldY = gMouse.cursor.Y
gMouse.oldZ = gMouse.cursor.Z
DarkGDK.Basic3D.Basic3D.PickScreen(gMouse.x, gMouse.y, 5000)
vx = DarkGDK.Basic3D.Basic3D.PickX + DarkGDK.Camera.DefaultCamera.CurrentPositionX
vy = DarkGDK.Basic3D.Basic3D.PickY + DarkGDK.Camera.DefaultCamera.CurrentPositionY
vz = DarkGDK.Basic3D.Basic3D.PickZ + DarkGDK.Camera.DefaultCamera.CurrentPositionZ
obj = DarkGDK.IO.Mouse.Pick(gTerrain.terrainObject)
If obj <> 0 Then
newX = DarkGDK.Basic3D.Basic3D.PickX
newY = DarkGDK.Basic3D.Basic3D.PickY
newZ = DarkGDK.Basic3D.Basic3D.PickZ
Else
newX = g.cursor.X
newY = g.cursor.Y
newZ = g.cursor.Z
End If
mx = newX - gMouse.oldX
mz = newZ - gMouse.oldZ
Else
mouseMoved = 0
End If
From this code, I can position the cursor on the terrain, and I can also use the movement difference to do other things (such as smooth the cursor movement).
Hope this helps, and works as it did in DBP!