Search Unity

Question Different localPostion when grabbing and releasing

Discussion in 'XR Interaction Toolkit and Input' started by cesarmascarenhas, Jan 17, 2022.

  1. cesarmascarenhas

    cesarmascarenhas

    Joined:
    Sep 28, 2021
    Posts:
    3
    Hello everyone!

    I'm pretty new when it comes to VR and even Unity, and for that, sorry if I'm asking something basic, and maybe not even using the correct names.

    When grabbing and tracking an object's localPosition utilizing XRRayInteractor.selectedTarget.transform.localPosition, I got different values comparing the value on Unity's Inspector and the from XRRayInteractor.selectedTarget.transform.localPosition console print.

    How to always track the localPosition based on the inspector values instead of XRRayInteractor.selectedTarget.transform.localPosition?

    Any help is appreciated!
    Thanks in advance!