I’m trying to develop a pause menu system for vr (i have the HTC Vive) and wondering what is the best way to
develop a vr pause menu system that look like below in the attached picture (screenshot from Dead Secret).
Basically what i want is if i push the menu button on the motion controller the level gets frozen and also dissappears from sight, and a similar screen appears as in the included image with dark background, where you can navigate between the inventory items, documents etc.
But the question is how to hide the level and show this pause menu screen with blueprints??
(Should i create the pause menu as a different level?)
Well, I came across this post while trying to do the exact same thing, also for my VR game.
The Ideal Solution:
Load your map’s GamePlay/Geometry in as a sub-level. Then also add your Menu map to the Streaming Levels list for that persistent world. You can now use the GetStreamingLevel node in Blueprints to get your levels by name. Then you can call SetIsVisible on them to enable and disable their visibility.
But my maps are already persistent!
I investigated changing the visibility of the Persistent Level. Do not do this. It is technically possible via C++ code
GetWorld()->PersistentLevel->bIsVisible = false;
However, when you make the Persistent Level no longer visible, all of the actors inside of the level stop rendering and stop ticking. This means your GameMode, Player Controller, all stop. It also seems to stop submitting frames to the viewport as the change was not visible in the viewport, but was in the World Outliner.
The other solution:
I have not tested this, but this is probably the solution I will choose:
Spawn your menu map as a sub level. Then make sure it’s far below your normal game maps (so they can never see it if it’s visible). Take a box and turn it inside out and put that in your Menu Map - now you can’t see your main map.
When you open the menu, either teleport your pawn to the Menu Map and when you close your menu teleport your player back, or, have two copies of their pawn. One in the Menu and one in the world, and change who they possess when you open the menu.