I have a number of unrelated maps I’m now starting to connect with level streaming as a level loader.
I have a first person character with all the usual stuff ( line trace for interaction etc ).
The character works fine usually, but when I use it in a streamed level, it suddenly seems about 1/3 height and the line trace doesn’t work.
The character ( blueprint ) is the same in both cases and in fact lives in the persistent level because I want to run code as levels are changing.
Does anyone know what is causing this? Is it not ok to keep a character in the persistent level?..
Thanks.
Don’t all answer at once…
Keeping the pawn in the persistent level is the good thing to do. Be sure all the stuff about nav mesh and so are set in the persistent level too.
Does the character get this 1/3 height if you play the stremaed level alone with the pawn in it ? Does it get this height when the level loads or when you enter the level volume ?
Hi Teapot, thanks for answering
Here are some fasinating facts about my setup:
-
I’m streaming with BPs, so no volumes.
-
If I spawn a fresh character on level load, naturally that works ( but undermines my system ).
-
But, if I destroy the character in the persistent, and spawn a fresh one, then load a level, that does not work ( same problem ).
-
It’s first person, so there’s actually no character to see. I’ve tried printing out the world scale of many things ( collision mesh, camera, eye height etc ) and they’re all normal. All I know is I’m apparently tiny and my line trace works a little, but hardly at all.
-
Playing any level without streaming ( just opening the map ) has always been fine.
The thing with having this character persistent constantly is it’s a great place to run post process effects that obscure the fact the levels are loading/unloading. If I can’t do it with the character them I’m stuck with either the persistent levelBP or an BP actor in there. Both of which I have to idea how to pass parameters to and call events in, even if that is possible?..
That’s a fact, persistent level + streaming levels is the way to go if you want to hide some transitions.
Does your issue happen with all of your streamed levels ? Did you try with a new empty level ? Have you tried migrating your whole project in a fresh one ?
cf your 4) : is the player that is tiny or the level which is spawned bigger ?
Yes, happens with all streamed levels.
Haven’t tried an empty level yet.
I don’t think migrating will help, I will try other things before that.
Re: 4) It’s defintely the character. I made some extra code so I can press a key and kill the tiny character and spawn a new one. Boom, right size immediately.
Like I say, I think there’s more info hidden in the fact the line trace only works about 30% of the time as well as shrunken charater.
I have figured out how to run all the code ( with some mods ) in a BP actor in the persistent level, so not the end of the world. But strange nevertheless…
Weird, yes. Sometimes migrating in a new project helps, in deleting unused parameters that could create issues.
Imo the line trace does fail due to collision meshes (weapon, skeletal mesh or world objects) and their respective scales.
And what about deleting and respawning a new charcter on level load (using post process effects to hide the thing) ? I guess you have some character informations you want to keep from one level to another, but this could be saved/loaded somehow…
Sorry I can’t help you more !
Yes - on the line trace problem, my thoughts exactly…
I think this is gonna be a workaround solution… :-/