looks like it might be because defaultCam is always true.

this always sets it to true.

Code:

`if((freeCamTime-=Time.d())<=0)defaultCam=true;`

this is run inside the if statement above.

Try setting it after the if(defaultCam) not inside it

Code:

`if (desired_camera.matrix.pos == camPos)`

{

freeCamTime=3;

defaultCam=false;

}

Code:

`if((freeCamTime-=Time.d())<=0)`

{

defaultCam=true;

if(defaultCam)

{

Matrix m=Players[0].refCar().actor.matrix();

camPos=Players[0].refCar().matrix().pos+Players[0].refCar().matrix().z*4;

AdjustValTime(desired_camera.matrix.pos,camPos,1);

if (desired_camera.matrix.pos == camPos)

{

freeCamTime=3;

defaultCam=false;

}

}else

{

desired_camera.yaw -=Ms.dir_ds.x;

desired_camera.pitch+=Ms.ds.y;

Clamp(desired_camera.pitch,-PI_2,0);

desired_camera.setSpherical(Players[0].refCar().matrix().pos,desired_camera.yaw,desired_camera.pitch,0,8);

Ball ball(0.1f, desired_camera.at);

Physics.move(ball, desired_camera.matrix.pos-ball.pos);

Cam.setPosDir(ball.pos, desired_camera.matrix.z, desired_camera.matrix.y);

}

Cam.updateVelocities().set();

}

that first if will look like this for the compiler because you dont close it