I changed the lines
cameraAngle.x += event.relative.x
cameraAngle.y += event.relative.y
to
cameraAngle.x += event.relative.x*mouse_sensitivity*get_physics_process_delta_time()
cameraAngle.y += event.relative.y*mouse_sensitivity*get_physics_process_delta_time()
the camera movement was way too fast, and mouse_sensitivity wasn't doing anything, so I multiplied it by mouse_sensitivity. It also wasn't being multiplied by delta, so I added that as well.
Also, after the camera movement, I added
$Camera.look_at(global_transform.origin+cameraOffset,Vector3.UP)
to rotate the camera in the right direction. There were some other problems in the code(one that caused the player to move far out of the map), but these changes should make the camera & moving relative to the camera work.