Announcement

Collapse
No announcement yet.

VR Expansion Plugin

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

    Thanks a lot for the great, in-depth reply!

    I hope I'm not being too pushy, but I've done some more testing and I still can't quite manage to fix the issue. I tried replicating the Grip Actor / Drop Actor calls and have them use the Force Client Side Movement option. This does indeed seem to make clients able to pickup and drop actors just like the host, albeit with a slight delay and much better syncing afterwards as you mentioned. However, when the client tries to throw the actor it still just drops straight down, whereas the hosts attempts all end up soaring away as you'd expect.

    I'm thinking maybe the "Simulate" option for the drop function call might not work as intended for clients in a listen server. Back when we were trying to make our own networked VR gripping system we manually set the items physics to not simulate on grip, and then simulate again on drop. This worked just fine for the host, but just like now it made the clients items simply drop straight down from their hands. It seems to me that maybe the momentum or velocity calculated by the physics engine are simply lost on the client side. I used to suspect this was some weird property we'd accidentally set somewhere, but in my tests now I made a blank VRGrippableStaticMeshActor in which I only set its mesh, had it simulate physics and generate overlap events, so I'm no longer so sure if it's caused by something we're doing wrong on our end.

    If it's the case that momentum/velocity is simply lost or never calculated properly on client side, I'm thinking maybe our only option would be to start calculating each hands velocity on tick and passing these values along to the option velocity paramters instead of using the simulate option. Having it be properly simulated by the physics engine would of course be preferable, but as it stands now it seems that just won't happen properly on our client side for some reason. Which is odd, as I've seen it working fine in other projects.

    I also tried updating to the newest version of the plugin (We are using the latest 4.19 preview), but in this case the plugin wouldn't compile. It claimed the "FScopedMeshBoneUpdateOverride" at line 1330 in the VRSimpleCharacterMovementComponent.cpp file was an undeclared identifier.

    Finally, wasn't able to find the part in the exampletemplate where it's checking for authoritative grips, so my solution was to just RPC all grips and drops as server functions as calling these on the host should have the same effect as calling them on a client. And I'm not quite sure what you meant by this:

    Originally posted by mordentral View Post
    You were missing the log messages from the other attempts
    Last edited by Mars-; 02-27-2018, 07:45 AM.

    Comment


      Originally posted by Mars- View Post
      Thanks a lot for the great, in-depth reply!

      I hope I'm not being too pushy, but I've done some more testing and I still can't quite manage to fix the issue. I tried replicating the Grip Actor / Drop Actor calls and have them use the Force Client
      Its all working correctly for me (aside from needing to change some brackets in the latest patch to cover when not sending the velocities for client auth).

      Are you using the optional angular / linear velocity inputs to the drop node? If you have the inputs reversed it would cause it to appear to drop straight down. But other than that it should be working fine, the plugin already sets simulating automatically and no, clients get velocity applied.

      The velocity of attached objects aren't calculated, but i'm not attaching these objects to the hands and even if I was I am reading their physics body velocity not their component one when I pass in the optional velocities and those update anyway.

      The point of the optional inputs is so that clients get the velocity of their release applied to the throw instead of relying on the server to be "close enough".


      Also thanks for the heads up on the scoped call, I hadn't built a non unity build in a bit so it was skipping over that, I updated 4.19 to fix it and ran a full non unity build to confirm (I generally run those near the end of a version update as I am usually the only one on the previews).
      Last edited by mordentral; 02-27-2018, 10:25 AM.


      Consider supporting me on patreon

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

      Comment


        I'm currently messing around with this expansion to use as part of a hobby game i'm designing for VR. I'm very new to this all but so far have found the plugin to be great.

        My current issue is that i'm trying to implement a holster system and i can't quite get my head around why it isn't working. The just of what i've done is on the event of a griprelease of the gunbase it checks to see if the gripped object component is overlapping the holster collision, if it is then attach the gripped object (the gunbase) to the LeftHolster socket attached to the LeftHoster mesh.

        I apologise if i'm coming at this from the completely wrong way but, like i said, i'm very new to this.

        If anyone can point out where i'm going wrong i would great appreciate it (or even share some tips on a better way of doing it)

        Comment


          Hi all, someone can tell me where download the 4.18 version? i can't find it on the branches tab (https://bitbucket.org/mordentral/vre...ugin/branches/)
          thank you

          Comment


            What's the best way to get the hand and the trigger pull amount while holding a gun?
            Such as...when you pull the trigger on the controller I want to move the trigger on the gun.

            Comment


              Originally posted by Reaver47 View Post
              Hi all, someone can tell me where download the 4.18 version? i can't find it on the branches tab (https://bitbucket.org/mordentral/vre...ugin/branches/)
              thank you
              Master is the 4.18 version, master will always be the newest current release.


              Consider supporting me on patreon

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

              Comment


                thank you very much for this fantastic plugin! I try to add body tracking following Marco Ghislanzoni's tutorial
                in https://www.youtube.com/watch?v=EKR8ogonD68 I'm finding some problems to put both together. It would be of great help some advice to be able to anchor the camera to the bone of the skeleton as it does in the tutorial.

                Comment


                  Originally posted by chismer View Post
                  thank you very much for this fantastic plugin! I try to add body tracking following Marco Ghislanzoni's tutorial
                  in https://www.youtube.com/watch?v=EKR8ogonD68 I'm finding some problems to put both together. It would be of great help some advice to be able to anchor the camera to the bone of the skeleton as it does in the tutorial.
                  His tutorial is for non roomscale characters, not all of it will apply, attach your mesh to a parent relative component with the bSetToFoot set to true to root it to the camera.


                  Consider supporting me on patreon

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

                  Comment


                    Originally posted by jkopke

                    Hey, I am struggling with HMD Camera access and render to texture support.

                    Is AcquireVRCamera the right way to do it? C
                    CreateCameraTexture2D gives me an empty texture.
                    GetVRCameraFrame fails when I plug an empty var to Target Render Target, and crashes unreal if I plug in an existing texture.

                    I've made sure my hmd front camera works properly outside of my project.

                    Any hints would be appreciated
                    CreateCameraTexture2D generates an empty texture of the right format for the camera (size and format). You call that, then pass it in the GetVRCameraFrame.

                    So:

                    AquireCamera - Save out the handle
                    CreateTexture
                    GetFrames
                    ReleaseHandle when done

                    I could have automated this all into a component, but wanted to leave it open and just expose OpenVRs functions themselves.


                    Consider supporting me on patreon

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

                    Comment


                      First of all, thanks for this awesome plugin!

                      I've got a question though: would it possible for 2 users to grab the same object in multiplayer? I've been messing around today a bit, but couldn't find how to do it. I've seen that the default practice is to just "transfer" the object to the other player, when he tries to grab an object already held by someone.

                      Comment


                        Originally posted by Beriol View Post
                        First of all, thanks for this awesome plugin!

                        I've got a question though: would it possible for 2 users to grab the same object in multiplayer? I've been messing around today a bit, but couldn't find how to do it. I've seen that the default practice is to just "transfer" the object to the other player, when he tries to grab an object already held by someone.
                        You'd have to change the default BP implementation in the template and then either use the second player as a secondary attachment or run it with physics grips so they both apply forces instead of direct following.

                        (cut out the Already gripping check and drop logic, late updates would HAVE to be off, likely would want to turn off the defaulted center of mass setting as well)

                        Anything beyond that is up to you as there is no way of me knowing how you would want that to behave.

                        I have plans to setup something like this anyway eventually using gameplay tags to define an object as multigrippable, but its not a high priority.


                        There is also a lot of considerations to take into account with multiple players gripping, what behavior exactly are you trying to get?


                        Consider supporting me on patreon

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

                        Comment


                          Originally posted by mordentral View Post

                          His tutorial is for non roomscale characters, not all of it will apply, attach your mesh to a parent relative component with the bSetToFoot set to true to root it to the camera.
                          Thanks for your explanation. I solved it in that way (except that I can not find the variable bSetToFoot but it is resolved anyway) and then I followed the tutorial. Thanks again for this great plugin and for this explanation. Great job

                          Comment


                            Apologies if this has been asked before, but I haven't spotted a solution if it's already been addressed: I've set up a damage-dealing volume using a conventional trigger-like structure using begin and end overlap, but the issue I'm facing is that the VRCharacter's Capsule Component is registering overlap events, rather than the VRRootReference. What do I need to change to fix this?

                            Damage triggers look like the attached example.

                            The following code allows the VRRootReference to register damage events, but does not keep the capsule component from generating overlap events as well:

                            Code:
                            ABFCharacter::ABFCharacter()
                                : RightHandGun(nullptr)
                                , LeftHandGun(nullptr)
                            {
                                 // Set this character to call Tick() every frame.  You can turn this off to improve performance if you don't need it.
                                PrimaryActorTick.bCanEverTick = true;
                            
                                GetCapsuleComponent()->SetCollisionResponseToAllChannels(ECR_Ignore);
                                GetCapsuleComponent()->bGenerateOverlapEvents = false;
                                VRRootReference->bGenerateOverlapEvents = true;
                            }
                            What did I miss?
                            Thanks!

                            Comment


                              Originally posted by KevODoom View Post
                              Apologies if this has been asked before, but I haven't spotted a solution if it's already been addressed: I've set up a damage-dealing volume using a conventional trigger-like structure using begin and end overlap, but the issue I'm facing is that the VRCharacter's Capsule Component is registering overlap events, rather than the VRRootReference. What do I need to change to fix this?

                              Damage triggers look like the attached example.

                              The following code allows the VRRootReference to register damage events, but does not keep the capsule component from generating overlap events as well:

                              Code:
                              ABFCharacter::ABFCharacter()
                              : RightHandGun(nullptr)
                              , LeftHandGun(nullptr)
                              {
                              // Set this character to call Tick() every frame. You can turn this off to improve performance if you don't need it.
                              PrimaryActorTick.bCanEverTick = true;
                              
                              GetCapsuleComponent()->SetCollisionResponseToAllChannels(ECR_Ignore);
                              GetCapsuleComponent()->bGenerateOverlapEvents = false;
                              VRRootReference->bGenerateOverlapEvents = true;
                              }
                              What did I miss?
                              Thanks!
                              ? What do you mean? The root reference IS the capsule component, I change the base class and provide a pointer to it so that accessing the functions are easier is all.


                              Consider supporting me on patreon

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

                              Comment


                                Hi,

                                I was able to build a new project in 4.18 with the plugin, but I was hoping to use the example to understand how to use some of the features as I am pretty new to this.

                                However, I am not able to build the example project. I tried dropping in the binary plugins as well and switch engine versions from 4.17, 4.18, and 4.19. I can generate VS files, but I can't build after that. Is there a known issue right now or am I doing it wrong?

                                Comment

                                Working...
                                X