Announcement

Collapse
No announcement yet.

VR-Ready C++/Blueprintable Pawn with common VR functions. Also good as a SteamVR project template.

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

  • #61
    Originally posted by VirtualSurrealism View Post

    Great, thanks for the help mate. Now I am faced with much bigger problem, the build crashes after i package it. I get the error "Fatal error: [File:\Build\++UE4+Release-4.16+Compile\Sync\Engine\Source\Runtime\CoreUObject\Private\Serialization\AsyncLoading.cpp] [Line: 2936]
    Missing Dependency, request for RunebergVR_Pawn but it hasn't been created yet."
    https://forums.unrealengine.com/unre...rything-so-far

    Comment


    • #62
      Thats fantastic, it fixed the problem. but now my player starts too far from the point where i want it to start from. the player start is located in the right position and it plays fine in the engine but in the build it moves it too far. any idea how to solve that problem?
      http://virtualsurrealism.com/

      Comment


      • #63
        Originally posted by VirtualSurrealism View Post

        Thats fantastic, it fixed the problem. but now my player starts too far from the point where i want it to start from. the player start is located in the right position and it plays fine in the engine but in the build it moves it too far. any idea how to solve that problem?
        Regarding the initial spawn position, not sure if you're describing the expected behavior -- Player start is where the pawn spawns but if your headset is away from the center of your play area, then you are offset from the spawn location by how much your headset is away from the center of your defined playspace.. This is as users may have their headsets out of their play area when starting a game (e.g. at their desk), and should be something you should cater for in your game/experience. If you want to “force” a repositioning of your level after pawn spawn, you can use the following node at the Pawn’s Begin Play event:

        https://docs.unrealengine.com/latest...ion/index.html

        Hope that helps.

        Cheers.
        ---
        runeberg
        VR Developer (C++ / BP), Room-scale specialist


        Web: http://runeberg.io
        GitHub: https://github.com/1runeberg/RunebergVRPlugin
        Free VR Plugin: https://www.unrealengine.com/marketp...ponents-plugin


        Comment


        • #64
          Thanks for the help runeberg, but unfortunately nothing is solving this problem. it always starts far from the player start position, it always starts near 0,0,0.
          http://virtualsurrealism.com/

          Comment


          • #65
            Originally posted by VirtualSurrealism View Post
            Thanks for the help runeberg, but unfortunately nothing is solving this problem. it always starts far from the player start position, it always starts near 0,0,0.
            Does this happen in a completely empty level as well? Couple of things to check (if by "build" you mean packaged project, check Item 5 specifically the node combo I posted there):

            1. Check your GameMode if it's pointing to the correct Pawn (VRPawn in this instance)
            2. Check your world settings for the level is pointing to the correct Gamemode
            3. Check if you have multiple player starts (or Pawn Actors) in the level
            4. Check for blocking collisions in your pawn mesh/es and the scene.
            5. Have a look at the notes in this post:
            https://forums.unrealengine.com/deve...20#post1390920
            6. If you are streaming levels, check Items 1 to 2 for your initial "main" persistent level, and items 3 to 4 for any other loaded level/s during game start.

            Hope that helps.
            Last edited by runeberg; 12-07-2017, 06:33 AM.
            ---
            runeberg
            VR Developer (C++ / BP), Room-scale specialist


            Web: http://runeberg.io
            GitHub: https://github.com/1runeberg/RunebergVRPlugin
            Free VR Plugin: https://www.unrealengine.com/marketp...ponents-plugin


            Comment


            • #66
              unfortunately even in an empty level i have the same problem. i will try your other solutions.
              p.s. i am using the pawn from your 04grab sample map.
              http://virtualsurrealism.com/

              Comment


              • #67
                Originally posted by VirtualSurrealism View Post
                unfortunately even in an empty level i have the same problem. i will try your other solutions.
                p.s. i am using the pawn from your 04grab sample map.
                For the demo project, levels were designed for the spawn point to be 0,0,0 (+ auto cam height offset)... if this is happening in an empty level, then definitely have a look at Items 1-3 closely in your project provided you are using the latest version of the plugin. You can also force a "respawn" at a different loc using the nodes I mentioned in Item 5, but in your case i reckon this should be your last recourse.

                Also, if you haven't yet, have a look at these vids which shows how to configure a VR level inluding Pawn starts using PlayerStart or a Pawn Actor:

                https://www.youtube.com/watch?v=BOPF...sVEm4g&index=3
                https://www.youtube.com/watch?v=ZZR_...1bfqso&index=2

                lemme know.
                Last edited by runeberg; 12-07-2017, 06:56 AM.
                ---
                runeberg
                VR Developer (C++ / BP), Room-scale specialist


                Web: http://runeberg.io
                GitHub: https://github.com/1runeberg/RunebergVRPlugin
                Free VR Plugin: https://www.unrealengine.com/marketp...ponents-plugin


                Comment


                • #68
                  Originally posted by runeberg View Post

                  For the demo project, levels were designed for the spawn point to be 0,0,0 (+ auto cam height offset)... if this is happening in an empty level, then definitely have a look at Items 1-3 closely in your ......lemme know.
                  So I decided to test it in a new project. So i first made a new first person project, then made a blank level and followed the youtube instruction, installed your plugin by copying the plugin folder into the project (Version - RunebergVRPlugin-4.16). made a new game mode "newVRgamemode" then right clicked on the RunebergVR_Pawn and created a blueprint class "newVRpawn" then went into the newVRgamemode and chose newVRpawn in pawn option. in the worldsetting i chose "newVRgamemode" and packaged the project. and still the same problem. the spawning is far from player start. . i am sure i am doing something wrong.
                  http://virtualsurrealism.com/

                  Comment


                  • #69
                    Originally posted by VirtualSurrealism View Post
                    So I decided to test it in a new project. So i first made a new first person project, then made a blank level and followed the youtube instruction, installed your plugin by copying the plugin folder into the project (Version - RunebergVRPlugin-4.16). made a new game mode "newVRgamemode" then right clicked on the RunebergVR_Pawn and created a blueprint class "newVRpawn" then went into the newVRgamemode and chose newVRpawn in pawn option. in the worldsetting i chose "newVRgamemode" and packaged the project. and still the same problem. the spawning is far from player start. . i am sure i am doing something wrong.
                    Hi-- so this is only happening when you package and not during VR preview? Can you check your Default Game Map (not Editor) in Project Settings and see if it is pointing to the correct map? also, make sure you are running "Enable HMD" (https://docs.unrealengine.com/latest...lay/EnableHMD/), but guessing it is if you are in your HMD yet spawning in a different location.

                    Another thing, did you manage to try Item 5?

                    Otherwise, post a link to your test project here and I can have a quick look.
                    ---
                    runeberg
                    VR Developer (C++ / BP), Room-scale specialist


                    Web: http://runeberg.io
                    GitHub: https://github.com/1runeberg/RunebergVRPlugin
                    Free VR Plugin: https://www.unrealengine.com/marketp...ponents-plugin


                    Comment


                    • #70
                      yes its only happening in the package and not vr preview in the editor, the default game map is set to the level i want to build, i can see all my level in the hmd but very far. i will try the point 5 and report back. will also try to upload the test project. thanks
                      http://virtualsurrealism.com/

                      Comment


                      • #71
                        Originally posted by VirtualSurrealism View Post
                        yes its only happening in the package and not vr preview in the editor, the default game map is set to the level i want to build, i can see all my level in the hmd but very far. i will try the point 5 and report back. will also try to upload the test project. thanks
                        cool. lemme know, also make sure you are using the "Enable HMD" node somewhere in Begin play to make sure you are in VR Mode after packaging as otherwise you'd be in non VR Mode and could be also the reason why you're perceiving that the camera is below where it should be; as out of the box, the plugin should have the camera offsets correctly for both the Vive & Rift with no modifs needed.
                        ---
                        runeberg
                        VR Developer (C++ / BP), Room-scale specialist


                        Web: http://runeberg.io
                        GitHub: https://github.com/1runeberg/RunebergVRPlugin
                        Free VR Plugin: https://www.unrealengine.com/marketp...ponents-plugin


                        Comment


                        • #72
                          thanks, i tick "Start in VR" in Project Setting and it works in VR, earlier on i was indeed facing the problem that it wasnt starting in VR then I put console command "stereo on" in level blueprint, but now just "Start in VR".
                          http://virtualsurrealism.com/

                          Comment


                          • #73
                            Originally posted by VirtualSurrealism View Post
                            thanks, i tick "Start in VR" in Project Setting and it works in VR, earlier on i was indeed facing the problem that it wasnt starting in VR then I put console command "stereo on" in level blueprint, but now just "Start in VR".

                            cool, yep the Project Settings tickbox defo way to go for pure VR projects, didnt realize it was already available in 4.16, the console command might be less useful/risky though in a shipping/non-development packaged build...

                            interesting you're having issues only in a packaged build even when your start game map and gamemodes are all set accordingly even with an empty level, thinking this could just be a misconfig. When you get the chance, share the test project (empty level) and I can have a quick look at your setup as the respawn solution in Item 5 shouldnt really be necessary in your scenario. Also, would help if you post screenshots of your Map settings from Project Settings, Custom GameMode properties and World setting properties here.
                            Last edited by runeberg; 12-07-2017, 02:16 PM.
                            ---
                            runeberg
                            VR Developer (C++ / BP), Room-scale specialist


                            Web: http://runeberg.io
                            GitHub: https://github.com/1runeberg/RunebergVRPlugin
                            Free VR Plugin: https://www.unrealengine.com/marketp...ponents-plugin


                            Comment


                            • #74
                              Hi, So I tried the new project and i have to confess that it works fine and i was a little too hasty in assuming that its happening in new project as well, the camera was moving inside the floor and making it look blank, but it does not move far away. but in my old project the problem is still there. i have attached the screenshots of the project setting, worldsetting, pawn and gamemode settings.
                              thanks and regards
                              http://virtualsurrealism.com/

                              Comment


                              • #75
                                Hi-- no worries, it just helps in isolating the issue.

                                Since it is only happening on your level it does point to something there that's possibly causing the Pawn to be pushed to a different location during spawn if this is indeed the issue. And as it is only happening in a packaged build, the likely culprit is something Physics-based in your level.

                                Therefore I suggest the following:

                                1. Review the collision settings in your level and the meshes and any collision volumes in the pawn (including the root component), perhaps remove some actors one at a time that's in or near the Pawn Spawn Location until you isolate the culprit.

                                2. The fact that it is spawning "far away" may also mean it could be a large collision volume or encompassing actor in your level.

                                3. The latest version of the VRPawn should already have this set but double check the following:
                                - Pawn is set to "Spawn, Ignore Collisions"
                                - Root mesh component (if unused) should have no collisions set
                                - Check the Capsule Collision settings and see if it's causing a block response to one of your actors in the level (also true for any mesh/es in the pawn)
                                - Check Pawn is set to Auto-Possess the correct controller.

                                4. Try putting the VRPawn as an actor directly (see 2nd video I posted in one of my previous responses) instead of using the Player Start approach. Take notice of a "Bad Size" indicator on the Pawn in the editor.

                                5. Failing the above, you can try the Item 5 workaround I posted before, which causes a move of the Pawn after initial spawn, you can also put a slight delay to ensure the pawn moves properly-- this won't help though if there's something significant blocking the Pawn in your level.

                                I hope the above tips helps, otherwise, if you are willing to share your level, this is probably better posted in a more general area of this forum with a link to a copy of your project so others who are willing to investigate deeper can check for you if you are stuck. If you have access to UDN (Epic support) this is also a good thing to bring up to them.

                                Cheers and good luck!
                                Last edited by runeberg; 12-08-2017, 04:37 AM.
                                ---
                                runeberg
                                VR Developer (C++ / BP), Room-scale specialist


                                Web: http://runeberg.io
                                GitHub: https://github.com/1runeberg/RunebergVRPlugin
                                Free VR Plugin: https://www.unrealengine.com/marketp...ponents-plugin


                                Comment

                                Working...
                                X