How to toggle VR <-> PC
how to toggle vr <-> pc
I've tried ExecuteConsolecommand(vr.bEnableHMD True, vr.bEnableStereo True) but it didn't work.
how can I do this?
asked Apr 09 '18 at 12:33 AM in VR
If you execute commands in C++ to do something that means you really doing something wrong, you need to search for proper functions for this. There should be something as console commands have access to exact same APIs as you do, C++ is not blueprint to do console commands.
In UEngine (which oyu access via GEnigne) there XRSystem pointer intefrace for VR/AR systems, from there you can access variority of functions related to HMD.
In there you got GetHMDDevice() and ferther in EnableHMD(bool). Note that moth XRSystem and HMDDevice can be null if those systems are missing, so do check to prevent crash.
You can also look up blueprint node source code of VR to see what to do to do something:
Follow this question
Once you sign in you will be able to subscribe for any updates here