Einfacher:
my.pan = clamp(my.pan - 5*mouse_force.x*time_step,-45,45);