Announcement

Collapse
No announcement yet.

VR Expansion Plugin

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

    Originally posted by Aidan Puche View Post
    Hi guys!

    I have one question. How we can change on the fly the settings in AdvancedGripSettings. I trying to deactivate AdvancedGripPhysicSettings when griping the second grip, without sucess.

    Only view Set BPAdvGripSettings Structure and set members in structure but don't change anything. I'm a bit lost with doing this.
    SetGripAdvancedPhysicsSettings is I think the only modifer that I don't have a function for.

    What about it are you trying to change? It is checked on replication but only changes the grip stiffness, however there isn't much to AdvancedPhysicsSettings that should ever need to be changed during a grip, aside from the stiffness and damping and there is already a function for that.

    Outside of the stiffness/damping the values are stored in the GripStructure itself once a grip takes place, you have to get the Grip of the object and set them there.


    Consider supporting me on patreon

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

    Comment


      I used to simulate the weight. If is double griped, this weight should be balanced (two hands is stronger that one) With this method i could simulate a LAG on the movement. In real world, grip a rifle or large weapon with one Hand and have got aim is a bit complicated. With physic enable, Aceleration Constant, and angular damping and stiffness i got a better feel with one hand, and a penalization. I don't want a RAMBO in my game with 2 AR, but if you like that, you can do, although a bit useless... but is the user and not me that decide that.

      In a previous version, i applied a recoil, but in VR is strange the weapon move like a snake in all directions with one hands, isn't intuitive.
      Viar Warfare - My first VR Game
      I'm Spanish, sorry about my english, i working on it every day.

      Comment


        Originally posted by Aidan Puche View Post
        I used to simulate the weight. If is double griped, this weight should be balanced (two hands is stronger that one) With this method i could simulate a LAG on the movement. In real world, grip a rifle or large weapon with one Hand and have got aim is a bit complicated. With physic enable, Aceleration Constant, and angular damping and stiffness i got a better feel with one hand, and a penalization. I don't want a RAMBO in my game with 2 AR, but if you like that, you can do, although a bit useless... but is the user and not me that decide that.

        In a previous version, i applied a recoil, but in VR is strange the weapon move like a snake in all directions with one hands, isn't intuitive.
        Acceleration constraint is the default type, you are just changing the angular.

        You should try using the SetGripStiffessAndDamping node instead it has an Option to set the angular values as well. Optionally, since you are altering a grip when you add the secondary attachment, you can also literally just edit the Grip structure itself for whatever values you want (if you are not client authority, client auth has to send a change up so you need to use the node).

        For reference, when not using advanced settings I multiply the stiffness/damping by these values for the angular

        Code:
        // Constraint multipliers for angular, to avoid having to have two sets of stiffness/damping variables
        const float ANGULAR_STIFFNESS_MULTIPLIER = 1.5f;
        const float ANGULAR_DAMPING_MULTIPLIER = 1.4f;
        Can use that for setting angular with the setter node for the same effect as turning off advanced settings.
        Last edited by mordentral; 05-15-2018, 04:01 PM.


        Consider supporting me on patreon

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

        Comment


          I'm did a mistake or something. Okay, i did that you tell me. I set the GrippableSkeletalMesh as Angluar and Stiffnes in 20 for example. In the OnSecondaryGrip, i pick de GripInformation and HeldHand pass to SetGripStiffnessAndDamping and set custom value to 0 (is the default values, no?) But nothing happens. I don't sure what i'm doing.

          GripInformation store all the information on Predominant Hand, no?

          I did this, but it not change anything, i know i doing something wrong, for i don't sure what i doing.

          https://blueprintue.com/blueprint/4dg6y1ll/
          Viar Warfare - My first VR Game
          I'm Spanish, sorry about my english, i working on it every day.

          Comment


            Originally posted by Aidan Puche View Post
            I'm did a mistake or something. Okay, i did that you tell me. I set the GrippableSkeletalMesh as Angluar and Stiffnes in 20 for example. In the OnSecondaryGrip, i pick de GripInformation and HeldHand pass to SetGripStiffnessAndDamping and set custom value to 0 (is the default values, no?) But nothing happens. I don't sure what i'm doing.

            GripInformation store all the information on Predominant Hand, no?

            I did this, but it not change anything, i know i doing something wrong, for i don't sure what i doing.

            https://blueprintue.com/blueprint/4dg6y1ll/
            For Clientside_Movement grips you need to call that function on the server.

            Regardless, you should be increasing the stiffness not setting it to zero? 0 stiffness/damping is an invalid number for constraints.

            I ran a quick test and it worked fine.


            Consider supporting me on patreon

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

            Comment


              Pushed a new commit to both repositories (actually this is a list of recent changes)

              Template
              Code:
              Changed controller model loading to be per hand and safe for oculus platform in the template
              
              Corrected Epics roomscale rotation for teleport boundries (unsure if they fixed this in their base template ever).
              
              Added optional tracking sensors to the teleport outline
              Plugin
              Code:
              Added a GetControllerDeviceID node to the grip controller
              Lets you get the XRsystem device id for the calling controller which is far easier than trying to match up ID lists to the specific controller.
              
              Added a master check for windowsMR to the SteamHMDType node.
              At some point need to branch it out to return each seperate HMD in MR
              
              Added grip re-creation case for if the advanced physics settings were turned off
              
              Added a config variable  / console variable for the rotation correction threshold with the new rotation rollback pathway.
              vre.RotationCorrectionThreshold (default 0.02f)
              
               SetGripConstraintStiffNessAndDamping was setting the handle via the passed in grip struct  
               and not the modified original, corrected this.  
              
               Also changed order of operations so that IsHeld is set prior to EventOnGrip and  
               NotifyGrip is called with the added grip information passed in so that OnGrips  
               that modify the grip information work correctly.


              Added a new entry under use cases (this time for a game jam game that I thought was pretty impressive for a 5 day deadline), not to mention not
              working off of the example map but implementing from the ground up using the plugin.

              Rise Of The Bots VR
              https://slapunas.itch.io/riseofthebotsvr
              Last edited by mordentral; 05-16-2018, 04:10 PM.


              Consider supporting me on patreon

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

              Comment


                I'm going to cry. I don't know nothing (hello, i'm John Snow). Okay i did your system. I pass it to the Server (but i'm the server in this test) and aparently works. The Angular Stiffness and Damping change, i see it in log. But i don't feel it, i feel the lag without change.

                I set the variables in 10/10 to test with one Grip, and set to 100/100 with two grips. The stiffness change, but i don't feel any change. The Weapon still moves with LAG.

                If i set the GrippableActor in BP Settings to 100/100 at start, the weapon moves greatly well, how at default settings. Also, when i change the Stiffnes, on release secondary grip, the weapon drops. I don't understand for what if i didn't change anything more than the stiffness and damping.

                But anyway, what is the default Stiffness and Damping when not set it in AdvancedGrip?
                Viar Warfare - My first VR Game
                I'm Spanish, sorry about my english, i working on it every day.

                Comment


                  Originally posted by Aidan Puche View Post
                  I'm going to cry. I don't know nothing (hello, i'm John Snow). Okay i did your system. I pass it to the Server (but i'm the server in this test) and aparently works. The Angular Stiffness and Damping change, i see it in log. But i don't feel it, i feel the lag without change.

                  I set the variables in 10/10 to test with one Grip, and set to 100/100 with two grips. The stiffness change, but i don't feel any change. The Weapon still moves with LAG.

                  If i set the GrippableActor in BP Settings to 100/100 at start, the weapon moves greatly well, how at default settings. Also, when i change the Stiffnes, on release secondary grip, the weapon drops. I don't understand for what if i didn't change anything more than the stiffness and damping.

                  But anyway, what is the default Stiffness and Damping when not set it in AdvancedGrip?
                  Default stiffness is 1500, you can see it in the grip settings struct, values of 100 are very low and 10-100 is barely a stiffness change.

                  The example gun uses 5000 stiffness.


                  Consider supporting me on patreon

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

                  Comment


                    In my case, it do nothing. I don't want change the Constraint. But is the only that GripStiffnessAndDamping do in my tests. One pic to be clear.

                    I want to change these variables, is it that produces the effect that i want. This is i set the Blueprint, but the Gun don't affect and i don't know what.

                    Custom Event is set to Server, but in Blueprintue don't show.

                    https://blueprintue.com/blueprint/_khnmgyu/
                    Viar Warfare - My first VR Game
                    I'm Spanish, sorry about my english, i working on it every day.

                    Comment


                      Originally posted by Aidan Puche View Post
                      In my case, it do nothing. I don't want change the Constraint. But is the only that GripStiffnessAndDamping do in my tests. One pic to be clear.

                      I want to change these variables, is it that produces the effect that i want. This is i set the Blueprint, but the Gun don't affect and i don't know what.

                      Custom Event is set to Server, but in Blueprintue don't show.

                      https://blueprintue.com/blueprint/_khnmgyu/
                      Yes...like I said, the difference between 10/15 and 100/100 is nearly none, you are setting them to nearly the same values. Also you do not want damping to be nearly as much as the stiffness, it just gets rid of the stiffness then. That is why default is 1500/300.

                      I am looking into something though, there might also be a bug here
                      Last edited by mordentral; 05-16-2018, 03:27 PM.


                      Consider supporting me on patreon

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

                      Comment


                        Yes, is there bug or something. But now know what happens.

                        The system, works as you said. But my mistake is the next:

                        When i saw your Q&A Video on YouTube where you explain the Angular Stiffnes and Damping. I started to try this functionality tweaking the values. When i set it to high values as you, i got the oposite effect what i want. But i now know what is the problem. If you set the Angular Stiffness and Damping in the BP settings it work as i said. But if you change during play, low values don't apply a physical delay in movement, and high values do the delay.

                        My mistake is that when i tested this, the value as 100 or more not change anything. And values below that 20 apply a physical delay.
                        Viar Warfare - My first VR Game
                        I'm Spanish, sorry about my english, i working on it every day.

                        Comment


                          Originally posted by Aidan Puche View Post
                          Yes, is there bug or something. But now know what happens.

                          The system, works as you said. But my mistake is the next:

                          When i saw your Q&A Video on YouTube where you explain the Angular Stiffnes and Damping. I started to try this functionality tweaking the values. When i set it to high values as you, i got the oposite effect what i want. But i now know what is the problem. If you set the Angular Stiffness and Damping in the BP settings it work as i said. But if you change during play, low values don't apply a physical delay in movement, and high values do the delay.

                          My mistake is that when i tested this, the value as 100 or more not change anything. And values below that 20 apply a physical delay.
                          Nah, it was just using the passed in grip struct instead of the found one for that node.

                          I fixed it, and will upload today.

                          I modified the change log post above to include them

                          *Edit* Patch released with this fix
                          Last edited by mordentral; 05-16-2018, 04:16 PM.


                          Consider supporting me on patreon

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

                          Comment


                            Thanks Mordentral, I love you so much! Downloading!

                            Tested and works as intended. Thanks again!

                            -----------------------

                            Recycling

                            I'm trying to rework one of my systems, I'm don't satisfied with it.

                            I Know that in Secondary Grip we can Smooth it with SecondaryGripScaler. But i want much more that it. I want to Smooth the rotation about 2 or 3 times. By example, if i rotate 10 degree the the gripped object only move 5 degrees (multiplier 2) or 2.5 degrees (multiplier 4) .

                            But i don't know how you calculate the rotation between two Grips. Obviusly, the rotation with one Grip is the Controller Hand Rotation. But with second Grip, i don't know how your plugin do it. I supose that calculates the LookingRotation between Grip1 Location and Grip2 location. But i don't sure that.

                            How i can achieve that?

                            Thank you in advance.
                            Last edited by Aidan Puche; 05-16-2018, 11:33 PM.
                            Viar Warfare - My first VR Game
                            I'm Spanish, sorry about my english, i working on it every day.

                            Comment


                              Originally posted by Aidan Puche View Post
                              Thanks Mordentral, I love you so much! Downloading!

                              Tested and works as intended. Thanks again!

                              -----------------------

                              Recycling

                              I'm trying to rework one of my systems, I'm don't satisfied with it.

                              I Know that in Secondary Grip we can Smooth it with SecondaryGripScaler. But i want much more that it. I want to Smooth the rotation about 2 or 3 times. By example, if i rotate 10 degree the the gripped object only move 5 degrees (multiplier 2) or 2.5 degrees (multiplier 4) .

                              But i don't know how you calculate the rotation between two Grips. Obviusly, the rotation with one Grip is the Controller Hand Rotation. But with second Grip, i don't know how your plugin do it. I supose that calculates the LookingRotation between Grip1 Location and Grip2 location. But i don't sure that.

                              How i can achieve that?

                              Thank you in advance.
                              You'll have to override the default logic for that, a functionality that is coming around the 4.20 update when I make some gripping changes. Until then it would have to be a custom grip that you run the logic for yourself. Originally the smoothing worked kind of like that, but it felt really bad for most uses.

                              You can edit the 1 Euro Low Pass Filter that the secondary smoothing uses though and add a really large smooth to it, which will significantly delay it, the ProjectSettings -> VRExpansionPluginSettings has the relevant settings for that.

                              Also no, I don't use LookAt, I don't like how it handles the rotation, I map hand location differences around the held object and use the Quaternion rotation from vector.


                              Consider supporting me on patreon

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

                              Comment


                                Yep, i know the EuroPass Filter option, but my problem is i don't want this settings in all grippable object. Only in a determinate object and situation. And the EuroPass settings isn't variable through a BP, no?

                                I try hack this with the AdditionTransform to compensate, compensating the rotation with addition trasnform. I think can work. Quaternion rotation from vector is not exposed to BP, VRExpansion, GripInfo or something expose this?

                                And it is all, i don't disturb you more. Thanks anyway, you rock!
                                Last edited by Aidan Puche; 05-17-2018, 10:53 AM.
                                Viar Warfare - My first VR Game
                                I'm Spanish, sorry about my english, i working on it every day.

                                Comment

                                Working...
                                X