UnityXR Jittery/Lagging Grabbables. 3 Ways to fix.

Sdílet
Vložit
  • čas přidán 14. 08. 2020
  • This is a generic tutorial about the UnityXR toolkit, but 100% applies to the handposer.
    First Way: Dealing with Rigidbody center of mass.
    Second Way: Increase Physics timestamp
    Third Way: Changes InteractionManager to use update Instead of FixedUpdate
    Link to UnityXR Hand Poser:
    assetstore.unity.com/packages...
  • Věda a technologie

Komentáře • 17

  • @damian3k
    @damian3k Před 3 lety +1

    Thanks, works like a charm :D

  • @Xzarations
    @Xzarations Před 3 lety

    Hey thanks this helped!

  • @HuDz1966
    @HuDz1966 Před rokem

    Is this why Boneworks, bonelab, h3vr and now vertigo 2 jitter?? I get 90fps locked in the game and frame times are well below 11ms yet there is stutter in hand movements etc. I get this in all unity games it seems ,-( ive also owned a valve index, Pimax 8kx and now a pico 4 and i get it in all of them, very frustrating.

  • @bfe580
    @bfe580 Před 3 lety +1

    can i know what do u put after "onSelectEnter.AddLister ( ________ ) => rigidBody ?

    • @mikenspired
      @mikenspired  Před 3 lety +1

      Here you are! thanks for watching
      xrGrabInteractable.onSelectEnter.AddListener((X) => rigidBody.centerOfMass = newCenterOfMass);
      xrGrabInteractable.onSelectExit.AddListener((X) => rigidBody.ResetCenterOfMass());

    • @bfe580
      @bfe580 Před 3 lety

      @@mikenspired thanks! i watch your videos because i bought your asset =) im using XR too but still beginner in coding haha

    • @mikenspired
      @mikenspired  Před 3 lety +2

      @@bfe580make sure to check out Valem and VR with Andrew on CZcams. both great sources to get started with unityXR. They also both have discord channels to get more general unityXR help.

  • @xXYannuschXx
    @xXYannuschXx Před 2 lety +1

    I wonder why this isnt an issue when using the SteamVR plugin. I guess I will take a look at the scripts they made.

    • @mikenspired
      @mikenspired  Před 2 lety +1

      This is still an issue 2 years later? Lemmie know if you find anything useful.

    • @RoxGame
      @RoxGame Před 11 měsíci

      @@mikenspired yeah the issue still happening

    • @xXYannuschXx
      @xXYannuschXx Před 6 měsíci

      @@mikenspired Hey, I know this is kind of a late response, but I compared the way SteamVR does velocity tracking to UnityXR Toolkit:
      SteamVR sets the fixedTimeStep automatically to the current refresh rate of the HMD during each Update() call. This shouldnt make any difference to when you do this manually (like you did) in OpenXR.
      SteamVR sets the Rigidboy interpolation to "none" when an interactable is grabbed, tried this aswell, but doesnt fix the jitter either.
      Lastly, like OpenXR, SteamVR just sets the rigidboy velocity and angularVelocity during FixedUpdate() to the value of the controller.
      I have the feeling that this isnt an issue with how the OpenXR toolkit handles the movement of the interactable itself (because both basically do it the same way), but rather in which order, at which time and (possibly) how it updates the HMD, controller, and XROrigin transforms.

    • @xXYannuschXx
      @xXYannuschXx Před 6 měsíci

      @@mikenspired Okay, I think I just found out why SteamVR seems so smooth compared to OpenXR:
      In OpenXR they just set the current velocity of the interactables rigidbody to the current position delta between its position and the position of the controller, divided by deltaTime.
      In SteamVR they do a bit more:
      First they calcute a target velocity, also using the position delta, but instead of dividing it by deltaTime they multiply it and then also multiply it by a "velocityMagic" constant (thats literally the name of it.
      Then they use MoveTowards, using the current velocity and calculated target velocity, with the maxDistanceDelta set to 10f multiplied by the objects lossyScale.

    • @mikenspired
      @mikenspired  Před 5 měsíci +1

      Damn you really dug into this, thats amazing. I'll have to check it out next time I am working on a project.@@xXYannuschXx

  • @ladyfarrahtarot
    @ladyfarrahtarot Před 3 lety +1

    You should look at tarot cards and make a game out of it. Its a story. You would like it!

    • @mikenspired
      @mikenspired  Před 3 lety

      Haha, maybe if I was making games. I am making tools for other people to make games.

    • @ladyfarrahtarot
      @ladyfarrahtarot Před 3 lety

      Damn