How can I implement a game which starts off using the keyboard, mouse and monitor, and then at some point, instructs the user to pick up the motion controllers and put the VR HMD on?
There are several ways of doing that.
The easiest is probably to build two different playercontrollers, and have two different levels with different default PlayerControllers in their GameMode.
The first level/playercontroller uses keyboard/mouse.
The second level/playercontroller uses VR.
The different levels would presumably also use different pawn classes for the player pawn.
Another way to do it is to take the VR playercontroller, and put in all the keyboard/mouse control logic into it, and switch which logic is run for each event using some mode flag that you build into the controller.
To switch mode, change the value of your mode flag in response to whatever ui/game event you choose.
You also want to build two different pawns, and destroy one and create/possess the other when you switch mode.
Do you not have to tell the engine somehow that now we’re in VR mode, render in stereo to the headset, or now we’re in standard mode, render higher quality to the fullscreen on the monitor only? Switching levels and pawns shouldn’t be a problem however I have no idea how UE4 handles the switch into and out of “vr mode”… so far that’s been taken care of automatically, depending on which project type I started with.
All you should have to do is make a vr pawn and a normal pawn and you theoretically can swche between them whenever you want.