How do i make the player roll to a maxium of 20º while the player is panning? The player must also roll to the side the player is panning.

my.pan = ((1 - (SmoothSpeed / 25) * time_step) * (my.pan - camera.pan) + camera.pan); // This is the code used to pan the player.

Thanks.