This is a question in AUM 68 ... might help


Quote:
Q: I'd like to have a camera that swings out a bit, just like a boat riding a small wave.

A: Here's an example.



function swinging_camera_startup()

{

var temp_cam = 0;

while (1)

{

temp_cam += 3 * time_step; // 3 = speed

camera.z += 0.5 * sin(temp_cam); // 0.5 = amplitude, replace camera.z with camera.x or camera.y if you need to

wait (1);

}

}