Do not have the camera follow the player by setting it as a parent. Instead, make a script that copies the player's position property and then have the camera update its own position based on that. That way you can offset the camera to any value you want on any given axis and you can also stop updating its position whenever something happens.
In your case you should copy the camera's position every frame in the func _physics_process()
. Create a variable named var falling
and set it to false by default. When the player's position is lower than some value in the y axis (or any other custom logic you have for recognizing falling), then set the falling
variable to true. The camera should then update its position only as long as the falling
variable is set to false
:
if falling==false:
Camera.position=player.position
If that helps, please mark this answer as best.