Announcement

Collapse
No announcement yet.

VR Does not Start in Standalone Game

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    VR Does not Start in Standalone Game

    My VR works fine in VR preview but it will not start in standalone game.

    I toggle VR as per the following BP. Any ideas as to what I need to do to get VR to work. Thanks.
    Attached Files

    #2
    By Standalone Game do you mean a packaged game or what? Which HMD are you using?
    CTO | Head of VR Development - Visit us at http://humanxr.com
    My UE4 Tutorials (mostly VR): https://goo.gl/GUvDyV

    Comment


      #3
      Use Vive and Standalone Game from the editor Play option, the VR Preview is fine. I just found something that indicated that VR does not work for Standalone games selected from within the editor which would explain why I'm not seeing it work.

      Is there an simpler way to test this without packaging a game to create a compiled version of the game as I'm trying to develop and test something that does not work in VR preview (I bought it from Marketplace and I need to tweak how it works with my game) and to have to test it each time after creating a package is not feasible (it takes hours to go through a package build ...)

      Comment


        #4
        Sure. You can run a non-packaged standalone version of your game as described in the official documentation here.This is the relevant part:

        Running from outside the UE4 Editor

        You can also run a non cooked Standalone game by first creating a shortcut to the UE4Editor.exe and then supplying the following command line arguments.

        Code:
        UE4Editor.exe [MyProject] [MyMap] -game
        Note that [MyProject] needs to be the absolute or relative path to your .uproject file.
        CTO | Head of VR Development - Visit us at http://humanxr.com
        My UE4 Tutorials (mostly VR): https://goo.gl/GUvDyV

        Comment


          #5
          i just went into project settings and ticked the box start in vr and it works with my rift.

          Comment


            #6
            Originally posted by sphinix257 View Post
            i just went into project settings and ticked the box start in vr and it works with my rift.
            No luck doing that with vive. Also tried -vr als commandline parameter for standalone launch option, didn't work either.
            NodePrefabs | PluginBuilder | NotificationBackbone | WidgetBox | RuntimeMeshImportExport | DebugWidget | SteamWorkshopAccessor

            Comment


              #7
              You can test non-packaged standalone by navigating to your ue4project.exe file, right-clicking, play.

              Testing for Vive can be a pain-in-the-***. It seems half the time it will just work, the other half you have to make sure that the headset and both controllers are awake and visible by the sensors, akwardly holding all devices up with one hand, launching the project with the other hand. Will still sometimes not work. Oh, also make sure steam and steam vr are running.

              No such trouble with oculus, except forgetting to tick "launch in vr".
              Last edited by NotSoAccurateNo1; 09-29-2018, 10:20 AM.

              Comment


                #8
                This is just a wild guess, cause I remember having a similar sounding problem like a year ago.. But I had to add an Execute Console Command to my Event BeginPlay that runs "stereo on", in order to get VR working in one of my projects that I tried to turn into a standalone package. Not sure if that's still necessary, or if they already include it in the UE4 templates these days. heh but sometimes it ends up being something small like that.
                Last edited by NikoKun; 09-30-2018, 12:56 AM.

                Comment


                  #9
                  Originally posted by NikoKun View Post
                  This is just a wild guess, cause I remember having a similar sounding problem like a year ago.. But I had to add an Execute Console Command to my Event BeginPlay that runs "stereo on", in order to get VR working in one of my projects that I tried to turn into a standalone package. Not sure if that's still necessary, or if they already include it in the UE4 templates these days. heh but sometimes it ends up being something small like that.
                  At some point this was true. The command is deprecated now. Now its vr.enablehmd true or you can use the Blueprint node for it. Still doing that, but it does not work when launching the Standalone game window, whatever the reason.
                  NodePrefabs | PluginBuilder | NotificationBackbone | WidgetBox | RuntimeMeshImportExport | DebugWidget | SteamWorkshopAccessor

                  Comment


                    #10
                    Hi all!

                    Also having this issue big time! Even Unreal BP VR Template does not function in any other mode than VR Preview! I have tried all the tricks listed in this conversation with no luck. Has anyone managed to solve this or have some advice? Would be much appreciated!

                    Comment


                      #11
                      Originally posted by TheoT View Post
                      Hi all!

                      Also having this issue big time! Even Unreal BP VR Template does not function in any other mode than VR Preview! I have tried all the tricks listed in this conversation with no luck. Has anyone managed to solve this or have some advice? Would be much appreciated!
                      you need to right click the .uproject file and select "Launch Game". But this way you are not connected to the Editor and can't use blueprint breakpoints. PrintString works though and if you have C++ code, you can attach to the standalone game with the Vidual Studio debugger. Launch Game needs Development Editor build. Using the commandline you can also launch it in debug.
                      NodePrefabs | PluginBuilder | NotificationBackbone | WidgetBox | RuntimeMeshImportExport | DebugWidget | SteamWorkshopAccessor

                      Comment


                        #12
                        I had a similar issue while packaging for Htc Vive. I corrected the issue by going to project settings, description, settings and checking start in VR.

                        Comment


                          #13
                          isn't there a simple way to launch the VR-Mode with the Game-Mode?

                          I mean.. when I hit the PLAY button, I basically simulate the game mode.
                          When a simple rotation on an animation is setup - you can see the animation within the game mode.

                          But when launching with the VR-Mode, by default it looks like it's just launching the VR-Mode with the Editor-Mode.

                          Is there no simple way to launch the VR-Mode with the Game mode?
                          So you can see the animation when using the VR?

                          Comment


                            #14
                            Packaging works, I can run the .exe, VR display & tracking are OK (headset) but controllers are disfunctionnal (hands stay on the ground, not following controllers).

                            Working with HTC Vive / UE4.24 / SteamVR 1.9.16 and the demo project from Valve SteamVRInput (in description https://www.unrealengine.com/marketp...put-for-unreal)

                            In Play / VR Preview it works fine, I can teleport, grab objects, shoot arrows (sample map Valve's sample project for UE4.24), but once packaged in a .exe the controllers are lost.

                            This is the closest I've come to get a functionnal Vive .exe project, if anybodoy as a solution path it would be welcomed.


                            Steps taken:

                            -SteamVR plugin options for VR Manifest & controller binding
                            -Projects settings / Engine/ Inputs / Check bindings
                            -Projects settings / Settings / Start in VR is checked

                            Previous setups:

                            -UE4.24 VR template project: OK in VR preview, .exe won't launch in Vive (I can see the scene on the PC screen, but I only get the loading prompt in the Vive)
                            -UE4.23 VR template project + SteamVR input plugin: Same as 4.24

                            Since I get consistant results in the VR preview, I'm specifically looking for problems with the .exe packaging.



                            Comment


                              #15
                              Originally posted by BernhardRieder View Post
                              isn't there a simple way to launch the VR-Mode with the Game-Mode?
                              Originally posted by BernhardRieder View Post

                              Any follow up on this? I'm having the same issues as others that I cannot get VR to work on a packaged exe. I am unable to choose the "Start in VR" option in the Project Settings because I need the game to start in a desktop window. I need the game to have a menu on the desktop with a simple UI that allows the user to choose whether to start the level using desktop or start the level using VR. I can't seem to switch from desktop to VR at runtime without the controllers not working.

                              Comment

                              Working...
                              X