Search Unity

Resolved How to avoid bounce in grabbed object just after teleporting?

Discussion in 'XR Interaction Toolkit and Input' started by xinuxano, May 6, 2021.

  1. xinuxano

    xinuxano

    Joined:
    Feb 28, 2018
    Posts:
    33
    I apologize if my question has already been addressed in the forum, I have not found the answer.
    I am using XR Interaction Toolkit in its latest preview version.
    I want to improve the experience when a user does a long teleport, holding a grabbed object in another hand.
    In this case, when landing, the object flies a moment after you to your position, and it seems to bounce elastically until it stops in your hand.
    Is there any script or configuration to avoid this bounce?
    Thanks in advance.
     
  2. xinuxano

    xinuxano

    Joined:
    Feb 28, 2018
    Posts:
    33
    A promising idea:

    a) the user grabs an object, the object and the hand controller must be identified
    b) just before starting the teleport, a FixedJoint is created between the hand and the object
    c) just when landing from the teleport, the FixedJoint is eliminated, the user keeps the object grabbed

    Now I have to write the scripts and do more tests.
     
    danazoid likes this.
  3. xinuxano

    xinuxano

    Joined:
    Feb 28, 2018
    Posts:
    33
    With some code and tweaking, I have been able to fix it with the above approach.
     
  4. CRLN

    CRLN

    Joined:
    Dec 18, 2020
    Posts:
    1
    Hi!
    I'm facing the exact same issues wondering if you would share your code?

    Thanks!