Announcement

Collapse
No announcement yet.

VR Expansion Plugin

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

    #31
    Originally posted by n00854180t View Post
    I think the only way to do it "cleanly" would be to change where it handles the late update and moving the components to recompute the new actor transform relative to the VR camera. But that's messy in its own way and as far as I know there's no way to split that code into a plugin.

    Another option would be to override GetActorLocation/Transform in order to always return the world location or transform of the camera component.
    Neither of those would work that cleanly, the late update wouldn't work at all since it wouldn't support game logic on the new position and returning the camera location is still working off of an offset that you would have to store and override a bunch of functions anyway, it would also be harder to decouple its location from the actor and the root component also has to return a different location as the movement code uses the roots location, not the actors.

    I should be able to get this method pretty stable after I re-write some of the charactermovementcomponent though so I am not all that worried. The movement component can't really work as is anyway as it has alot of code based around standard pawns that you don't want for VR (physics objects moving you is a nono and all of the step up on code is sickness inducing).


    Uploaded fixed version with the camera parented, i'll start working on a new movement component based off of the character one tomorrow. As is I tested it and works "ok" with the default movement component, just needs tweaks.
    Last edited by mordentral; 07-27-2016, 08:40 PM.


    Consider supporting me on patreon

    My Open source tools and plugins
    Advanced Sessions Plugin
    VR Expansion Plugin

    Comment


      #32
      Meh, 90% of the character movement code needs to be dropped for VR after looking through the entire thing. Crouching is set up badly for it, step up is bad for it, all capsule code is offset upwards by half of a capsuleheight, root motion is not required...ect ect

      I am just going to use a pawn as the base instead of a character and make a basic movement component for it instead of using character movement component. I don't think re-using the built in character is even remotely worth the effort considering how much of it is useless for this case.

      This being the case, subclassing a character for VR isn't needed anymore, you can just replace the root component on a standard pawn with the VR Root Component instead. So I am removing VRCharacter again.

      Oh well, this is why it is a WIP plugin
      Last edited by mordentral; 07-28-2016, 01:55 PM.


      Consider supporting me on patreon

      My Open source tools and plugins
      Advanced Sessions Plugin
      VR Expansion Plugin

      Comment


        #33
        If a camera component with Lock to HMD set to true is the root component, that will effectively be the same as moving the actor in the late update. I was considering doing that, but didn't want to lose some of the CharacterMovementComponent conveniences. If you end up making a custom movement component, that would be the best of both worlds.
        Storyteller - An immersive VR audiobook player

        Dungeon Survival - WIP First person dungeon crawler with a focus on survival and environmental gameplay ala roguelikes

        Comment


          #34
          Not really, the late update just shifts the render transform prior to actually rendering so it would still be the initial tick position. Also if the camera was the root the controllers would have to be changed to subtract the cameras location from theirs as they work in the same relative space, or they would have to be set to absolute positioning entirely, you would also be missing collision unless you added some sort of unlinked collision to the camera component itself that didn't follow roll and pitch.

          There isn't a perfect way of doing it right now I don't think. Going with a barebones custom movement component and the root component that offsets its collision seems to be working well enough to get to where I want to go, I'll let it ride for now. It won't (at least in the short term) have some of the more complicated CharacterMovementComponent features, but it also will be better than running traces every tick from the headset since it has an actual collision capsule to work from.


          Consider supporting me on patreon

          My Open source tools and plugins
          Advanced Sessions Plugin
          VR Expansion Plugin

          Comment


            #35
            [MENTION=11208]n00854180t[/MENTION]

            Ok, so I had second thoughts and spent a good deal of time breaking down the standard character movement component, final decision was that it was viable after all. This is in its own branch for now due to having to finish up loose ends but I think I got pretty much the entire **** package done today. Includes all of the replication and network interpolation for the base actor movement that the standard character movement component has (I didn't have to change a **** thing there), and it controls a custom Character Pawn that uses my VR root component so that collision is in the correct location.

            I have been working through it and removing areas where it is trying to step up on physics objects (I got pretty sick the first time I ran into that "feature") and making sure it is using the root capsule offset location for all collision tests.

            I need to get rid of a few small quirks still but in general I think it is where I wanted to be. Once I get the movement component rock solid (have to check all movement modes for bugs) I am going to try out a few different movement styles as standard features.



            Consider supporting me on patreon

            My Open source tools and plugins
            Advanced Sessions Plugin
            VR Expansion Plugin

            Comment


              #36
              That looks awesome, mordentral!
              Storyteller - An immersive VR audiobook player

              Dungeon Survival - WIP First person dungeon crawler with a focus on survival and environmental gameplay ala roguelikes

              Comment


                #37
                First commit with the completed VRCharacter is up, it is usable, will require more debugging though.

                It has specific VRForward/Up/Right vectors for adding movement input based off of the collision capsule if you want look based movement.

                Currently it blocks being able to walk through static geometry when moving in the real world, I will add the option to allow clipping through walls if only physically walking in the real world later on.

                Walking and falling are the only totally tested movement modes at the moment, let me know if swimming / flying has any issues you run into if you use them.




                I'll post the wiki updates tomorrow
                Last edited by mordentral; 07-30-2016, 11:15 PM.


                Consider supporting me on patreon

                My Open source tools and plugins
                Advanced Sessions Plugin
                VR Expansion Plugin

                Comment


                  #38
                  Wiki updates are up, will start adding some pictures to help clear up some areas regarding the VRCharacter.


                  Consider supporting me on patreon

                  My Open source tools and plugins
                  Advanced Sessions Plugin
                  VR Expansion Plugin

                  Comment


                    #39
                    For the new controller plugin do I add "VRExpansionPlugin" to this file - \Engine\Source\Runtime\Projects\Projects.Build.cs?

                    When I do I can't build the project.

                    PublicDependencyModuleNames.AddRange(
                    new string[]
                    {
                    "Core",
                    "Json",
                    "VRExpansionPlugin",
                    }
                    Last edited by serbaside; 08-02-2016, 11:53 AM.

                    Comment


                      #40
                      Originally posted by serbaside View Post
                      For the new controller plugin do I add "VRExpansionPlugin" to this file - \Engine\Source\Runtime\Projects\Projects.Build.cs?

                      When I do I can't build the project.

                      PublicDependencyModuleNames.AddRange(
                      new string[]
                      {
                      "Core",
                      "Json",
                      "VRExpansionPlugin",
                      }
                      No, in your project folder "/source/projectname.build.cs" add it in there. Plugins are loaded per project not in the engine itself.


                      Consider supporting me on patreon

                      My Open source tools and plugins
                      Advanced Sessions Plugin
                      VR Expansion Plugin

                      Comment


                        #41
                        Originally posted by mordentral View Post
                        First commit with the completed VRCharacter is up, it is usable, will require more debugging though.

                        It has specific VRForward/Up/Right vectors for adding movement input based off of the collision capsule if you want look based movement.

                        Currently it blocks being able to walk through static geometry when moving in the real world, I will add the option to allow clipping through walls if only physically walking in the real world later on.

                        Walking and falling are the only totally tested movement modes at the moment, let me know if swimming / flying has any issues you run into if you use them.




                        I'll post the wiki updates tomorrow
                        I'd love to see a Battle Dome style pushback if you walk into static geometry. I always suspected that it would be a good way to handle people putting their heads through stuff, but never got time to test it myself.
                        Storyteller - An immersive VR audiobook player

                        Dungeon Survival - WIP First person dungeon crawler with a focus on survival and environmental gameplay ala roguelikes

                        Comment


                          #42
                          Originally posted by n00854180t View Post
                          I'd love to see a Battle Dome style pushback if you walk into static geometry. I always suspected that it would be a good way to handle people putting their heads through stuff, but never got time to test it myself.
                          It works fine, one of the first VRCharacter commits had exactly that in it and it just feels like you are pushing the world away from you. It was a temp solution though and caused some view floating so I am looking into other ways of handling it for the future and disabled it until I do. The boolean to turn it on/off is still in but isn't functional until I figure out the best way to handle it.


                          Consider supporting me on patreon

                          My Open source tools and plugins
                          Advanced Sessions Plugin
                          VR Expansion Plugin

                          Comment


                            #43
                            Originally posted by mordentral View Post
                            No, in your project folder "/source/projectname.build.cs" add it in there. Plugins are loaded per project not in the engine itself.
                            Thanks for the directions, looks like I had to first do 'File > New C++ Class' to get the source folder and then rebuild with the plugin folder.

                            Comment


                              #44
                              Decided to do an explanation video....I realized that some of the plugins features aren't entirely clear.



                              Consider supporting me on patreon

                              My Open source tools and plugins
                              Advanced Sessions Plugin
                              VR Expansion Plugin

                              Comment


                                #45
                                Originally posted by serbaside View Post
                                Thanks for the directions, looks like I had to first do 'File > New C++ Class' to get the source folder and then rebuild with the plugin folder.
                                I'll offer a precompiled version eventually that won't require anything but putting it in Engine/Plugins. I just don't want to start building it for all platforms until I am not updating it multiple times a day.


                                Consider supporting me on patreon

                                My Open source tools and plugins
                                Advanced Sessions Plugin
                                VR Expansion Plugin

                                Comment

                                Working...
                                X