Alternative methods would be:
pick screen screen width()/2, screen height()/2, 1.0
(get pick vector x(); get pick vector y(); get pick vector z())
You can also get the internal data using a dll call.
sync on
sync rate 0
`Load DBP camera debug dll
load dll "DBProCameraDebug.dll", 1
make memblock 1, 64 : `Will hold the camera matrix
`Cube
make object cube 1, 5
`Sphere
make object sphere 2, 1
do
angle# = wrapvalue(angle# + 0.1)
position camera newxvalue(0, angle#, 10), 10, newzvalue(0, angle#, 10)
point camera 0, 0, 0
`Get internal data
GetCameraInternal(0, 1)
`Show internal data
set cursor 0, 0
print memblock float(1, 0), " : ", memblock float(1, 4), " : ", memblock float(1, 8), " : ", memblock float(1, 12)
print memblock float(1, 16), " : ", memblock float(1, 20), " : ", memblock float(1, 24), " : ", memblock float(1, 28)
print memblock float(1, 32), " : ", memblock float(1, 36), " : ", memblock float(1, 40), " : ", memblock float(1, 44)
print memblock float(1, 48), " : ", memblock float(1, 52), " : ", memblock float(1, 56), " : ", memblock float(1, 60)
`Position the sphere right in front of the camera
position object 2, camera position x() + memblock float(1, 8)*4.0, camera position y() + memblock float(1, 24)*4.0, camera position z() + memblock float(1, 40)*4.0
sync
loop
function GetCameraInternal(id, mem)
`Get access to the internal camera structure
ptr = call dll(1, "?GetInternalData@@YAPAXH@Z", id)
`Copy the view matrix (offset +64) to the memblock
copy memory get memblock ptr(mem), ptr + 64, 64
endfunction
Sven B