Search Unity

Question Interactions on fast-moving platforms

Discussion in 'XR Interaction Toolkit and Input' started by eV-Interactive, Jan 22, 2021.

  1. eV-Interactive

    eV-Interactive

    Joined:
    Oct 25, 2016
    Posts:
    41
    So, we are interested in using interactions on a fast-moving vehicle - think controls in an airplane cockpit. Are there any best-practices for this yet, or is this new territory? Most of the 3rd party VR interaction systems don't have a good solution for this.

    The problem is likely due to the fact that the tracker is updated just before rendering, but the physics objects are updated in FixedUpdate, meaning the collision spacetime is different from the render spacetime. (Apologies to Einstein for the use of "spacetime.") Thus, we get a lot of "jitter" in collision detection.
     
  2. Matt_D_work

    Matt_D_work

    Unity Technologies

    Joined:
    Nov 30, 2016
    Posts:
    202
    Using the instantaneous movement type on the grab interactable behavior will help reduce the visual jitter (although the collision volume will still lag behind, which is to be expected).

    We'd need to know more about the problems you're facing to suggest any solutions, eg: it may be easier to have the "user" and local interactable objects in a different scene which isnt moving and composite onto the world.
     
  3. eV-Interactive

    eV-Interactive

    Joined:
    Oct 25, 2016
    Posts:
    41
    Hi - sorry I missed this reply. I'm working up switches and levers in the cockpit of an aircraft, so no jitter at all is acceptable for my situation. I've been rolling my own non physics-based solution with a custom collision system that works in "frame time". I'll continue on this course unless you believe there should be some way to do lag-free interactions with the XR Interaction Toolkit.