1
\$\begingroup\$

I work on a zero gravity space VR game where player can hold to an object and rotate around it using their hand. Imagine spacewalk on ISS, grabbing a handle with your extended hand and trying to move yourself around, including rotation.

When player grabs the object and moves hand/rotates wrist, I calculate where their body should move and apply transformations.

My issue is with jerkiness of controller input. It's just not smooth and doesn't feel very nice. Raw controller input has no lag, but high frequency and low amplitude jitter.

So far I tried slerp and 1Euro filter, but in both cases if jitter was reduced, I couldn't manage to reduce lag to an acceptable level.

What adds to complexity is that I need to smooth out both position and rotation and if any of them lags more than the other, movement is off.

I wonder if there are any other solutions I could look into?

I'm using Godot 4

\$\endgroup\$
2
  • \$\begingroup\$ I reached out to some experienced VR devs who I'd heard discussing this recently, so hopefully they'll have some tips they can share after the holidays here. \$\endgroup\$
    – DMGregory
    Dec 24, 2023 at 11:16
  • \$\begingroup\$ Thanks @DMGregory, looking forward to it! \$\endgroup\$
    – Patryk
    Dec 25, 2023 at 22:07

1 Answer 1

0
\$\begingroup\$

Lag and smoothness are competing goals in the real-time 3D input context.

You must choose one over the other.

Either it is at the VR location, or it getting there over time.


When player grabs the object and moves hand/rotates wrist, I calculate where their body should move and apply transformations. My issue is with jerkiness of controller input. It's just not smooth and doesn't feel very nice. Raw controller input has no lag, but high frequency and low amplitude jitter.

Any signal filtering will add input delay.

The answer is to limit/restrict the "hand/rotates wrist" input to reasonably small adjustment values within the given game constraints.

In space, slow and steady is the name of the game. Moving too fast in zero G has consequences...


\$\endgroup\$
2
  • \$\begingroup\$ This answer would be better if it explained how to limit/restrict the input to reasonably small adjustment values. Do you have an example algorithm or threshold values you've found work well in your own VR games? \$\endgroup\$
    – DMGregory
    Feb 18 at 14:37
  • \$\begingroup\$ @DMGregory, I have no examples or values, that could align with the OPs given code and requirements. Compare Apples to null. -- My answer was to limit the raw delta values to minimize the high frequency noise without adding delay. The exact values must balance accuracy and range, and when combined leads to filtering delay. \$\endgroup\$
    – agone
    Apr 16 at 2:57

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .