Man you're great at this 3D stuff! I have never gotten around to even trying the 3D in AppGameKit, but this is a cool addition. Related, DBP has the wonderfully simple command "Set Camera To Follow Object" which eradicates any sophisticated math to create a nice 3rd person camera view or other uses. Does something exist like this yet for AGK--if not would be awesome to have it ported into a similarly structured function.
SET CAMERA TO FOLLOW X, Y, Z, Angle, Distance, Height, Smooth, Collision
SET CAMERA TO FOLLOW Camera Number, X, Y, Z, Angle, Distance, Height, Smooth, Collision
Original DBP code snippet:
autocam on
make matrix 1,4000,4000,100,100
set matrix height 1,50,50,500
update matrix 1
make object sphere 1,10
set camera rotation xyz 0
set camera range 0,1,3000
while mouseclick()<>1
a#=a#+1 : if a#>359 then a#=a#-360
x#=500+(cos(a#)*100) : z#=500+(sin(a#)*500)
distance#=200.0 : height#=100.0 : smooth#=25.0
dx#=x#-camera position x(0):dz#=z#-camera position z(0)
angle#=atanfull(dx#,dz#)
set camera to follow 0,x#,0,z#,angle#,distance#,height#,smooth#,0
set camera to object orientation 0,1
endwhile
while mouseclick()=1 : endwhile
delete matrix 1
autocam off
end