I have a camera centered around 0,0,0 and it's supposed to update every frame, but it looks really choppy, can anyone help me fix it...

code:
Code:
function main()
{
	wait(2);
	video_window(vector(1,1,0),vector(1050,620,0),244,"OBJector");
	level_load ("test.wmb"); // load the level
	ShowWindow(hWnd,SW_MAXIMIZE);  // Maximize window on startup
	wait(1);diag("\n\n\n"); //delay 1 frame then add 3 line seperators to the diag file acklog.txt
	mouse_mode = 1; // show the mouse pointer
	mouse_pointer = 2;  // show mouse arrow
	//used to sync the mouse
	mouse_sync = 1;	RECT r;    GetClientRect(hWnd,&r);    video_set(r.right,r.bottom,0,0);
		
	camera.x = 0;
	camera.y = 0;
	while(1)
	{

		camera.x = -(cos(camera.pan)*300) * ((cos(camera.tilt)));
		camera.y = -(sin(camera.pan)*300) * ((cos(camera.tilt)));
		camera.z = -((sin(camera.tilt)*300))+150;
		
		camera.pan -= mouse_force.x*2;
		camera.tilt -= mouse_force.y*2;

		if(key_esc)	break;
		wait(1);
	}
	sys_exit("");
}




thanks... I hope tongue


Black holes are where God divided by zero.