Hi. Ok so I know world partion is relatively new and not everyone is up to speed but I’ll try to make this as simple to understand as possible.
So, I set up my map, enabled world partition, set the cell loading range, made a landscape…All seems to be working, objects appear and dissapear when crossing the loading range. All good
HOWEVER…
I have a player character, and a vehicle…I climb in to the vehicle (player is attached to vehicle on entering) and I speed off in to the distance towards a test cube (for testing the cell loading range)…and the second I hit the max loading range i set…BOOM, the vehicle dissapears and the player is just sat there, static, in mid air (at the point where the player was attached to the vehicle)
Now, My immeadiate thought is that the cell loading range is somehow hooked to the original location of the player when entering the vehicle. So as I’m speeding off, even though the character mesh is attached to the vehicle…the cell loading range is still applying from where my character entered the vehicle…
Does that sound like it’s the case? And if so, of if it’s any other reason…what would be the solution?
Hopefully I tried to make this as simple as possible to understand and hopefully it will help others if they have a similar issue.
So, yeah, you appear to be right. I just ran into this myself today. If I have AI wander from one cell to another, when their original cell unloads, they still unload with it.
It doesn’t seem like things are updating based on their current location, only their initial location sticks.
I did figure it out. Soooo, anything like that you would want to go in to the actor BP (your AI BP in this instance) and in the details panel search for (world partion, partion, world) any of those…and then set it to “always loaded”. Now, when you place those actors in your world they may be invisble and greyed out. In the world outliner just right click on it and hit the option to load it in.
True facts. But it works for me, for development and testing purposes, until someone can shine light on the issue. It’s only really a temp fix so development can sort of continue and not come to a halt.
Interesting wrinkle on this is that it seems spawned AI already does this and acts like it’s always loaded.
It’s probably fine for now, like you mentioned it’s not the worst to work around and I might use it to do some more sophisticated open world stuff anyways.
While disabling “Is Spatially Loaded” does work, is there a way to allow for the pawn to be unloaded while unpossessed? Otherwise, if the pawn is positioned away from the currently possessed pawn, it will fall through the unloaded terrain chunk. For instance, if there are multiple vehicle pawns placed in the world, I certainly wouldn’t want all of them loaded if they are far away from the player.
Ideally, the vehicle should start by being bound to the grid cell it’s placed in. Then, on being possessed, it transitions to the persistent world. On unpossessed, it is again bound to the current grid cell it now resides in. I’m unsure how to accomplish this behavior.