A question that comes up often in the papervision3D community is how do you make a camera that will can orbit around a point on all axis, while maintaining a constant distance. Well with a little math we can do this. Here is a quick demonstration of a camera that does this. And just for fun, and because papervision is cool, the light is also rotating around the cubes in this example, so it will be changing also.
and the how:
// create some variables. Distance is how far away you want to be var distance:Number = 950; var theta:Number; var phi:Number; // on your loop // update theta and phi based on your mouse positions, then update the camera position theta = mouseX * Math.PI / 180; phi = mouseY * Math.PI / 180; camera.x = distance * Math.cos(theta) * Math.sin(phi) camera.z = distance * Math.sin(theta) * Math.sin(phi) camera.y = distance * Math.cos(phi);
and thats it!