rem Clicking 3D objects: PICK OBJECT - OpenDBC tutorial (DarkBASIC Professional) sync on : sync rate 60 autocam off color backdrop rgb(20, 22, 36) for n = 1 to 9 make object cube n, 8 position object n, ((n - 1) mod 3) * 14 - 14, ((n - 1) / 3) * 14 - 14, 0 color object n, rgb(70, 90, 150) next n position camera 0, 0, -60 point camera 0, 0, 0 do hit = pick object(mousex(), mousey(), 1, 9) if hit > 0 text 10, 10, "Object " + str$(hit) + " at distance " + str$(get pick distance(), 1) else text 10, 10, "Point at a cube" endif sync loop