Search Unity

Question When I grab a rigidbody, I can push it through world geometry

Discussion in 'VR' started by martincmartin, Feb 20, 2021.

  1. martincmartin

    martincmartin

    Joined:
    Feb 7, 2021
    Posts:
    1
    I have a table (just a cube), and a sphere. The sphere has a rigidbody and an XRGrabInteractable. If I drop the sphere on the table, it doesn't penetrate the table. But if I grab the sphere and push it into the table, I can push it into the table. Like, half the sphere will be inside the table, or more.

    Instead, I'd like the sphere and the hand model to stop moving once the sphere touches the table.

    How do I do that?
     
  2. Matt_D_work

    Matt_D_work

    Unity Technologies

    Joined:
    Nov 30, 2016
    Posts:
    202
    In this case, you could use the "velocity" tracking mode (make sure you set the smoothing values to 1). this will stop the sphere from transitioning through the table.