Wondered if you could attach camera to the position of an object, obviously if you give the ball a radius your camera is stuck inside the ball so i tried making radius = 0. This does then do what I'd expect with the position of the ball and therefore camera moving out along the negative z axis, however the green floor is not visible. However if i manually zoom out with the track pad then I see the green square (it's as if the camera was way into the negative z direction so can't see the square , which shouldn't be the case) also once the square is in view after zooming it just stay there???
GlowScript 3.1 VPython
floor = box (pos=vec(0,0,0), size=vec(1000, 1000,1), color=color.green)
scene.camera.axis = vec(0,0,-1)
ball = sphere(pos=vec(0,0,20), radius=0)
scene.camera.pos = ball.pos
while True:
rate(1)
#scene.camera.pos.z += 1
ball.pos.z += 1
scene.camera.pos = ball.pos
print(scene.camera.pos)