Godot Version
4.4.1 mono
Question
At one point in my game, the player is teleported about 200 units upward. At this time, several lights and geometries in the old space are no longer visible, so they are hidden. Likewise, new geometry and lights in the new space become visible at this time. When launching from the editor, this works perfectly every time. When launching from a built game, this shift causes the shadow buffer to break every time. Shadows start flickering, from all light sources. Shadow projectors break entirely. Which geometry lights shade has little relation to the geometry that should be casting shadows.
When I load a saved game from the teleported-to location, this doesn’t happen. But if I load a game right before the teleport, and perform the teleport, I see the issue.
So, clearly, it’s something to do with the movement of the player, or more likely, the deactivation/activation of a massive amount of geometry/lights all at once.
See here for a demonstration of the problem: https://youtu.be/FqQBtB2vS8Q
Any idea how I can further diagnose/fix this?