Search Unity

SteamVR physics interaction object not syncing with player movement/rotation

Discussion in 'VR' started by FrenchCardinal, Jun 5, 2019.

  1. FrenchCardinal

    FrenchCardinal

    Joined:
    Oct 28, 2018
    Posts:
    8
    I'm using a HTC Vive and I created a grabbing code that allows the player to use velocity based interaction to have the object follow the controller while being able to push other objects based on mass and also created a movement script that uses rigidbody modifications (MovePosition/MoveRotation) to adjust the player's position/rotation.

    The objects move fine but then lag behind when either moving/rotating with controller inputs. I modified the movement and grabbing code so that when the player uses the controller to move/rotate then the grabbed object will receive the same translation values. It worked for the most part but the movement (slightly) and object's rotation lags slightly when the player rotates the object at different angles.

    Scenario: The player initially grabbed an object when their hand was around 90 degrees and while keeping their hand at around 90 degrees and rotating around using the controller, the object's rotation is fine. However, when changing the hand's rotation then rotating around, the object's rotation lags.

    Here is a video of me grabbing objects and moving around then rotating to show the different results.
     
  2. eron82

    eron82

    Joined:
    Mar 10, 2017
    Posts:
    83