Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Vector3.Distance from VR controller to object not accurate at all.

Discussion in 'AR/VR (XR) Discussion' started by dimitur_kolev2, Mar 21, 2019.

  1. dimitur_kolev2

    dimitur_kolev2

    Joined:
    Nov 2, 2015
    Posts:
    19
    lol help me
     
  2. StayTalm_Unity

    StayTalm_Unity

    Unity Technologies

    Joined:
    May 3, 2017
    Posts:
    182
    Can you provide us with some context?
    Maybe a code sample or small example project that shows off what you expected versus what Unity gave you?
     
  3. dimitur_kolev2

    dimitur_kolev2

    Joined:
    Nov 2, 2015
    Posts:
    19
    I fixed it,now Ive stumbled across another problem.Basically im trying to do a physics based IK full character whose hands dont go through walls using FinalIK,VRTK and Oculus.I dont know how to best stop the hands from jittering because Atm they are attached to the controller anchors with a character joint.I use the distance to see if the hand is too far from the controller and then freeze the rigidbody but it isnt optimal.The main issue is that once a collision occurs at for example a pipe and my hand goes around the pipe ,the hand still needs to be close to the controller to attach back.Any suggestions will be greatly appreciated..