This bug. This one bug. It pops up worse in some builds. Sometimes I can run around in game, in and out of buildings, completely fine. Then close and reopen the editor and the first building I enter I fall through the floor again. It's one of those bugs that is so game breaking to a player. It's not something fun and quirky (like the giants smashing people into the sky in Skyrim) that adds to the game. It's a bug that throws the player out of the experience. It sucks.
So I've been digging into this all week.
I'm using data layers and the world partition system to handle interiors and exteriors of the game. When the player goes from the exterior world to the interior of a building the layer holding the exterior world is hidden and the layer holding the interior is shown. Pretty simple right? There's a bit of juggling to make it happen though. The interior has to load first, the player needs to move to that interior space, then the exterior can unload. If the interior ever took just a second too long then the player would move without anything to stand on and then fall off into the void. There's also the save game logic that has to process on each layer being hidden or unhidden - but that isn't contributing to this bug. This also happens whenever the game is loaded from a save. The save game reads where the player is (interior/exterior) and loads that location then drops the player in.
There's this blueprint node "is Streaming Completed" that takes a streaming source (a component you can drop onto an actor) and sees if the streaming location around them is loaded. You can also set the priority of a streaming source. The caveat though is this doesn't seem to play well with the old data layer subsystem. The system that I was still using, not realizing that it was being replaced by something newer. But it does seem to work with the data layer manager stuff. (Also as a side thing... you might notice how all the systems have similar names 'data layer subsystem' 'data layer manager' 'world composition' 'world partition' and digging through forum posts or tutorials for this stuff can be a grind)
So...
Now I freeze the player's movement so they can't move or fall or do anything. I fade the player camera to black. I tell the new location to load and I move the player to the correct spot. I set a timer function to check if the streaming source on the player is completed and I loop that every second until it completes. Once the streaming node says it's completed I delete the timer, unload the the previous layer the player was one, unlock the player movement, and fade the player camera back in.
And this handles when a player is loading a game, when they're using a door, or when they're triggering a teleport through dialogue.
Yeah. One week. Most of it was tracking down everything and understanding why it was breaking in the way it was. And like now that I know how to put it all together the solution seems pretty simple. And -hopefully- this is the final fix for this bug.
But so far testing seems to be solid, and the levels seem to be loading a bit faster with the new data layer manager hooked up. I need to test against some of the save volumes and make sure they work well together. But between this and the save system working the level of jank should be significantly reduced in the next build.
Alright I'm hoping to be back to working on finishing up content for the build this coming week - just hope I don't run into anymore major bugs!
slaen
2025-10-16 02:36:41 +0000 UTCslaen
2025-10-16 02:21:01 +0000 UTCsoneone7274
2025-10-12 05:43:03 +0000 UTCOscar Wilde
2025-10-09 17:51:45 +0000 UTC