Announcement

Collapse
No announcement yet.

VR Expansion Plugin

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

  • I am almost afraid to ask this question because it might be super complex... I am curious how hard it would be to have whatever object I grab/pickup replace the motion controllers or hands?

    For example... If i pick up a screwdriver, my hand/motioncontroller becomes that screwdriver until I drop it and then it changes back to the motioncontroller. I think this would be easier than making everything fit right to a socket.

    Comment


    • Originally posted by AtmaStudios View Post
      I am almost afraid to ask this question because it might be super complex... I am curious how hard it would be to have whatever object I grab/pickup replace the motion controllers or hands?

      For example... If i pick up a screwdriver, my hand/motioncontroller becomes that screwdriver until I drop it and then it changes back to the motioncontroller. I think this would be easier than making everything fit right to a socket.
      ? Hide the motion controller / hand visually, it is dead simple.

      The point of sockets is to get the offset correctly, because otherwise you have to have the zero point of the object offset for the correct location or you have to provide an offset transform. They aren't really there for the hand mesh to object to be correct as that is implied if the hand mesh is correctly setup to the controller in the first place.

      Sockets are the fastest method of iterating over getting correct grip locations, you can do it without them as well, its just generally more work unless you keep in mind some distances like controller zero point to tip of palm, ect.


      Consider supporting me on patreon

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

      Comment


      • mordentral

        I think the hiding controller visually and just showing the held object instead might be the way I want to go so then I do not have to worry about hand grip animations/different holding positions, etc. Sockets make sense, but in many ways I feel I am over my head as I have not gotten a socket to work yet.

        So to make the hand disappear and the object take its place while holding it would I just do something like "On pickup -> Cast to Motion Controller (L or R) -> Toggle Visibility of Handmesh" ??

        Thank you

        Comment


        • Originally posted by AtmaStudios View Post
          mordentral

          I think the hiding controller visually and just showing the held object instead might be the way I want to go so then I do not have to worry about hand grip animations/different holding positions, etc. Sockets make sense, but in many ways I feel I am over my head as I have not gotten a socket to work yet.

          So to make the hand disappear and the object take its place while holding it would I just do something like "On pickup -> Cast to Motion Controller (L or R) -> Toggle Visibility of Handmesh" ??

          Thank you
          Yeah...but the sockets aren't just for with visible hands though, even without visible hands you are going to need a way to define where the held object is in relation to your controller or it will feel weird if you aren't free picking it up.....

          IE: if you snap a baseball bat with a zero point at its center to your hand then you will end up holding it halfway up it and it won't feel right.

          Sockets are just the easy way of doing this that can be done with no guess work and in the editor. Otherwise you will have to add offsets, modify the transform of the gripped object, or model it / set the zero point to where you want to grip it at, which also makes it harder for multiple grip snap locations.

          Basically unless what you are doing is literally just inflexible gripping of base objects, you will regret direct attachment without alterations down the line somewhere.

          You also have to keep in mind that the VR grip sockets use prefix's for their names to define what ones are grippable, you can check out the gun model to see what I mean, otherwise there wouldn't be a way of knowing what the socket is for.
          Last edited by mordentral; 11-13-2017, 08:39 PM.


          Consider supporting me on patreon

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

          Comment


          • Sweet, thank you. Your gun model should point me in the right direction. Thank you again for the clarification.

            Comment


            • Dear Mordentral,

              one long time request (pardon if answered earlier) Can we make the preview resolution 1920 by 1080. Currently its a strip where as most of the other experiences are full screen.

              thanks and regards
              Jo

              Comment


              • Originally posted by Jomax3d View Post
                Dear Mordentral,

                one long time request (pardon if answered earlier) Can we make the preview resolution 1920 by 1080. Currently its a strip where as most of the other experiences are full screen.

                thanks and regards
                Jo
                You mean the mirror mode? Epic added native support for that in 4.17 (and then improved it in 4.18 since Vive was buggy). Otherwise is requires ENGINE source changes in earlier versions to fix it, something I can't access with a plugin without re-writing the separate VR plugins themselves.

                Its an easy change in earlier versions in the source to fix, but you would have to compile the engine from source for that.


                Consider supporting me on patreon

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

                Comment


                • Awesome Plugin. I have been working on floating pawn movement with physics for a while, it took some work to get the parent changed from pawn to the VR character, but it was worth it. I am just using the pawn for collision and movement to make my current pawn much more solid in game. I have put you in credits, so be sure to check it out. I will PM you with a steam key when the new update will go live tomorrow on steam: http://store.steampowered.com/app/698110/Reficul/ with changing to this system.

                  I just have two issues, which are probably linked to the same problem, I have spent hours on it and more hours looking through pages on this thread.

                  I have everything working except AI - which looks at as spot 2 feet in front of me while attacking my current position (Using Behaviour trees, based on the detour-crowd AIcontroller (Parent) - if that is of any use. At the same spot 2 feet in front, when I add yaw input to my pawn, for 3drudder (using Add Controler Yaw Input) it is rotating 2 feet in front and throws my teleport - direction totally off. Is there any way to make this central to where my camera is located?

                  The AI issue with looking and attacking 2 feet in front is fixed if I reparent to Simple Character. But VR character which has the customisations I need for my custom pawn. Any advice on this would be really helpful.



                  Last edited by Swilliams; 11-14-2017, 08:55 PM.
                  Founder And Director - Mad About Games Studios Ltd. - http://www.magstudios.co.uk

                  Solo Developer of :

                  Ghostship Aftermath (Unreal 3 Engine) http://store.steampowered.com/app/280890
                  CDF Ghostship (Unreal 3 Engine) http://store.steampowered.com/app/263640
                  CDF Starfighter VR (Unreal 4 Engine) http://store.steampowered.com/app/433190
                  Starfighter Origins (Unreal 4 Engine) http://store.steampowered.com/app/564950

                  Comment


                  • Originally posted by Swilliams View Post
                    The AI issue with looking and attacking 2 feet in front is fixed if I reparent to Simple Character. But VR character which has the customisations I need for my custom pawn. Any advice on this would be really helpful.
                    I have a custom VRAIController in the plugin that you can set for the AI. All it does is override the

                    GetFocalPointOnActor
                    LineOfSightTo

                    functions so that they correctly target the offset HMD location, this is much like what RR did for their AI. The detour controller overrides the base AI controller so that it can set a custom path following component, you would either need to copy my VRAIController code (the two functions over), or copy the detour AI and re-parent it to the VRAIController, either method would work.

                    *Edit* I don't know how often the detour crowd controller is used, it may be worth overriding it as well in the plugin at some point. I added a note to my private trello about it.


                    Also for the teleport rotation you need to teleport around a Pivot (being the HMD). I have a shortcut node RotationAroundPivot in the VRExpansionfunctionlibrary that will do this for you and provide an output rotation and new location. The template also shows how this works.


                    Both of these things you ran into are because the VRCharacter retains the engines current default of the HMD being offset from the actors zero point. The simple character locks the camera movement to the characters movement, however that in itself limits some of the things it can do compared to the full VRCharacter.
                    Last edited by mordentral; 11-14-2017, 09:42 PM.


                    Consider supporting me on patreon

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

                    Comment


                    • Pushed new commit live


                      Code:
                       
                       Moved Grip type enum comments into the enum area so they show on hover  
                           
                       Added bIgnoreRotationFromParent to parent relative attachment, when true the  
                       parent relative attachment no longer follows the parents rotation, only its position.  
                       (SpaceHarry was using this for body meshes where he was IKing the rotation himself  
                       in the animation graph.  
                           
                       (thanks to SpaceHarry for the original pull request that added both of these)  
                           
                       Overrode IsWithinEdgeTolerance and added VREdgeRejectDistance to the VRMovementComponent.  
                       This allows for stepping up easier without very slow movements getting in the way  
                       and causing wall sliding. Default engine value is 0.15f, new default plugin value  
                       is 0.01f (rounded min for HMD movement in network). If you encounter issues you may  
                       want to raise it.  
                           
                       Changing bIgnoreHandRotation to reconstruct and resolve the controller  
                       instead of requiring it be modified prior to passing to the server.  
                           
                       Changed GetControllerRelativeTransform to no longer take an input object for  
                       checking bIgnoreHandRotation, it is no longer needed. Kept the node around anyway  
                       because the default in engine nodes variables are named silly and confusing.


                      Consider supporting me on patreon

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

                      Comment


                      • Originally posted by mordentral View Post

                        Yeah...but the sockets aren't just for with visible hands though, even without visible hands you are going to need a way to define where the held object is in relation to your controller or it will feel weird if you aren't free picking it up.....

                        IE: if you snap a baseball bat with a zero point at its center to your hand then you will end up holding it halfway up it and it won't feel right.

                        Sockets are just the easy way of doing this that can be done with no guess work and in the editor. Otherwise you will have to add offsets, modify the transform of the gripped object, or model it / set the zero point to where you want to grip it at, which also makes it harder for multiple grip snap locations.

                        Basically unless what you are doing is literally just inflexible gripping of base objects, you will regret direct attachment without alterations down the line somewhere.

                        You also have to keep in mind that the VR grip sockets use prefix's for their names to define what ones are grippable, you can check out the gun model to see what I mean, otherwise there wouldn't be a way of knowing what the socket is for.

                        Okay, I have been looking at the gun and the sockets and such. Is there a way to make this much simpler? I really am thinking nothing more than a picked up object orients itself into your hand a specific way. Or that it removes the VR hand and becomes your hand in the right position. I can see how to add sockets to Actors, but I cannot see where to set that socket to the VR Hand controller. Any chance you could share a small blueprint example of a very basic setup?

                        Thank you again.

                        Comment


                        • Originally posted by AtmaStudios View Post


                          Okay, I have been looking at the gun and the sockets and such. Is there a way to make this much simpler? I really am thinking nothing more than a picked up object orients itself into your hand a specific way. Or that it removes the VR hand and becomes your hand in the right position. I can see how to add sockets to Actors, but I cannot see where to set that socket to the VR Hand controller. Any chance you could share a small blueprint example of a very basic setup?

                          Thank you again.
                          The template character that you are using does it automatically, it searches for sockets within a gripping range when you go to grip and if any match the prefix (default: VRGripP) it will snap to the closest one.

                          Setting the PrimarySlotRange in a grippable component/actor to the size of the mesh ensures that it will always use a socket.

                          You LITERALLY just have to add a socket that starts with VRGripP to a mesh that is grippable and it does it for you.

                          The reason the gun has multiple sockets is because it supports dual hand gripping and alternative orientation for touch controllers, you don't need to worry about any of that right now.


                          Consider supporting me on patreon

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

                          Comment


                          • Updated pre-compiled binaries to 4.18.1 and pushed a minor plugin commit that added the DetourAIController override to the plugin.


                            Consider supporting me on patreon

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

                            Comment


                            • Originally posted by mordentral View Post

                              The template character that you are using does it automatically, it searches for sockets within a gripping range when you go to grip and if any match the prefix (default: VRGripP) it will snap to the closest one.

                              Setting the PrimarySlotRange in a grippable component/actor to the size of the mesh ensures that it will always use a socket.

                              You LITERALLY just have to add a socket that starts with VRGripP to a mesh that is grippable and it does it for you.

                              The reason the gun has multiple sockets is because it supports dual hand gripping and alternative orientation for touch controllers, you don't need to worry about any of that right now.


                              I just tried this. I attached a socket with the name "VRGripP" to a pick up cube (the mesh part) but it does not snap to the socket. It still just grabs to any point on the mesh.

                              I also added the GrippableBox component inside of the Blueprint Editor and sized it to the size of the Mesh. I am able to pick up the mesh, but it does not lock to the socket.
                              Last edited by AtmaStudios; 11-15-2017, 07:06 PM.

                              Comment


                              • Originally posted by AtmaStudios View Post



                                I just tried this. I attached a socket with the name "VRGripP" to a pick up cube (the mesh part) but it does not snap to the socket. It still just grabs to any point on the mesh.

                                I also added the GrippableBox component inside of the Blueprint Editor and sized it to the size of the Mesh. I am able to pick up the mesh, but it does not lock to the socket.
                                Do it with a grippable static mesh component or actor instead using the mesh you are trying to use. The pick up cube actors in the template are only there to show how to manually implement the interface and they don't do everything.

                                GrippableStaticMeshActors and GrippableStaticMeshComponents are full pre-fab classes.


                                Consider supporting me on patreon

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

                                Comment

                                Working...
                                X