Just found out, the camera was using local rotation instead of global. In line 60 camera.transform.basis should be camera.global_transform.basis. Fixed in the new version v3.1.1.
Viewing post in Godot First Person Controller comments
Amazing, thank you!
There are two things I'm trying to figure out with my copy of BasicFPC. I'm intending to solve these myself but I will also send the feedback here in case it's useful for you.
1. Handle head bumps so if the character's head hits the ceiling they don't hover.
2. Fix movement issues when using keyboard controls while PS4 controller is connected.
Anyway I'm just having fun with all this, and you've saved me a lot of time!