Rigidbody Tracked Interactables lag way behind Axis Movement
See original GitHub issueEnvironment
- Source of VRTK: GitHub master
- Version of VRTK: v4 beta
- Version of the Unity software: 2019.1
- Hardware used: Oculus
- SDK used: UnityXR
Steps to reproduce
- in the example scene change the hammer follow type to
FollowRigidbody
- start the scene and switch to axis control
- grab the hammer and move with axis control
Expected behavior
The hammer should follow the controller without any lag
(see v3.3 functionality)
Current behavior
The hammer lags behind the controller considerably
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (5 by maintainers)
Top Results From Across the Web
How to properly fix camera and rigidbody stutter / jitter / lag?
At first sight it's nice, player is not lagging, everything around is moving smooth, but when player moves, then everything else ...
Read more >XR Grab Interactable | XR Interaction Toolkit | 2.3.2
Interactable component that allows for basic grab functionality. ... it can appear to lag behind and not move as smoothly as Instantaneous.
Read more >VR in Unity: Advanced Grab Interaction Behaviors
Velocity Tracking : Some delay in movement tracking while held which can be seen as jittery. Will collide with every object regardless of ......
Read more >XR Grab Interactable | XR Interaction Toolkit | 2.0.4
Set Movement Type to Velocity Tracking to move the Interactable object by setting the velocity and angular velocity of the Rigidbody. Use this ......
Read more >UnityXR Jittery/Lagging Grabbables. 3 Ways to fix. - YouTube
This is a generic tutorial about the UnityXR toolkit, but 100% applies to the handposer. First Way : Dealing with Rigidbody center of...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Moving all of the relevant follow processes to fixed update and in the correct sequence does work (but is a clunky workaround)
This is all in the AxesToVector3 moment processor:
The issue is a race condition in the fixed update routine.
If the Rigidbody Follow FixedUpdate processes before the AxesToVector3 FixedUpdate (via their respective MomentProcessors) then the issue occurs.
However, if the AxesToVector3 processes before the RigidbodyFollow then it works fine.
This can be confirmed by disabling the moment processor on the RigidbodyFollow and adding the MomentProcess from the RigidbodyFollow to the AxesToVector3 MomentProcessor List (in the second element slot).
This ensures the FixedUpdate processes the axis movement before processing the rigidbody follow and removes the issue.
The reason it worked in v3.3 was pure fluke of how the components in the example scene were saved so the race condition didn’t occur. but it is possible to recreate the issue in v3.3