1
\$\begingroup\$

i'm trying to get my main menu level works... but when i play from the main menu and go into the "Game"scene player will fall down throught the floor, but won't if i play directly from the "game"scene... what i'm doing wrong? i'm using UGAmePlaystatistics::OpenLevel() to change level from Main menu to Game level..and i didn't touch any of the value inside the third person character.. any help?

https://www.youtube.com/watch?v=MpIYgzOaBt8

\$\endgroup\$
1
  • \$\begingroup\$ What collision presets do the character and floor have? \$\endgroup\$
    – Ali
    Commented Mar 25, 2022 at 13:14

2 Answers 2

1
\$\begingroup\$

My guess would be that the player pawn/actor is created before the floor and thus falls through just enough so that when the floor is created it can fall completely though. To test this theory you could move the spawnpoint of the player just a little bit up or only enable gravity simulation when the whole scene is loaded

If this doesn't work, perhaps you can post a screenshot of the configuration of the player and of the floor in the inspector so other people can more easily reproduce this problem.

\$\endgroup\$
0
\$\begingroup\$

When using UGameplayStatics::OpenLevel to start a new level, the physics assets might not be loaded immediately. This is because OpenLevel both opens and starts the level, including loading assets, at the same time.

To address this issue and ensure that all necessary assets are loaded before starting the new level, you can use the UGameplayStatics::LoadStreamLevel function first, followed by UGameplayStatics::OpenLevel when the Level is ready.

The LoadStreamLevel function asynchronously loads the specified level in the background, allowing assets to be loaded while your game continues running. Once the assets are ready, you can then use OpenLevel to actually start the level.

Blueprint version

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .