Unity-Technologies / XR-Interaction-Toolkit-Examples

This repository contains various examples to use with the XR Interaction Toolkit
Other
1.1k stars 360 forks source link

Jittery hands on Oculus Quest #30

Open AlekseiBo opened 4 years ago

AlekseiBo commented 4 years ago

I am trying XR interaction toolkit with Oculus Quest. No matter what setting I try I see a really jittery movement both for grab interactables and for game objects attached to the controllers. Example scenes behave the same way. Is this supposed to be like that?

AlekseiBo commented 4 years ago

For both kinematic and velocity movement types this jittering persists in all case in the WorldInteractionDemo scene. However, for instantaneous type there are cases when movement is completely smooth.

frederickjjoubert commented 4 years ago

Have you checked that your project Fixed Time Step is set to the correct refresh rate of your hardware?

DataGreed commented 4 years ago

@alexeibo Were you able to solve it? I am currently facing the same issue with Oculus CV1.

@frederickjjoubert are you implying that fixed timestep is supposed to be set to match the refresh rate of the hmd? Like 1/90 for 90Hz? But are the hands really moved by physics engine and if there really are (which I find very strange as I am using an empty XR Rig with just “laser pointers” for teleportation and these pointers appear in double vision, there is no physics involved as far as I can tell) why can it be an issue? In all my non-vr games I use 1/30 second for fixed timestep and everything runs smoothly on high fps (120+), I was under impression that Physics engine interpolates between fixed timesteps.

To clarify: my laser pointers/hands appear in double vision even if I don’t grab anything

YezenRashid commented 3 years ago

Bumping this. Are there any solutions provided by Unity?

The problem: When moving with an XRGrabInteractable that is Kinematic you encounter jittering. The object will start moving around and won't be smooth. This can best be seen here https://youtu.be/X2QYjhu4_G4?t=692 He also does a great job of explaining the issue.

What I've Tried:

  1. So I've tried the above, but that involves a hacky solution of going into the XRGrabInteractable and modifying it. (That is no good as you when you update the library your changes will get overriden).
  2. You could child the xr grabbable to the XR Camera Rig. This will remove all the jittering, but you get the funky attribute of not being able to move the gun while moving. So no more jittering, but you get the jarring effect of the gun being stuck in place while moving.
  3. I feel like I could hack a solution by overriding ProcessInteractable and then just ripping for the most part the kinematic object movement relative to the interactors from XRGrabInteractable. Then from there if you lerp'd that movement you'll probably get rid of the jitters. But I feel like there will be a few problems with that.

This has been an issue for quite some time and I'd love to get some Unity help or input.

PicoPlanetDev commented 3 years ago

Bumping this also!

VR With Andrew's solution (modifying process interactable) is only able to somewhat reduce the jittering.

Hoping Unity finds a solution or some advice.

My fixed timestep is 1/100 for simplicity.

colorgas commented 3 years ago

Yes, it is jittery like hell regardless the fps. Seems the update logic has issues.

teelrc commented 3 years ago

I think @frederickjjoubert 's point was that the jittering may be because the position/rotation of the interactables is updating at a different rate than the display (i.e. using FixedUpdate rather than update). I think the default fixed timestep in unity is 0.02 (or 50 times per second). I'm using oculus quest which has a display running at 72 frames per second. With default fixed timestep the position is updating at 50 times per second so I see jitter.

I set edit->Project Settings->Time->Fixed Timestep to 1/72 and it completely addressed the jittering for the interactables as now the display refresh rate and position/rotation update rate are in sync.

If you'd prefer not to change the Fixed timestep, you can also enable interpolation on the rigibody of the interactables image