I have a velocity tracked XRGrabInteractable and my issue is whenever it’s put in an XRSocketInteractor its rigidbody becomes kinematic, and when taken out of the socket it remains kinematic. I’ve tried manually setting kinematic = false and useGravity = true using onSelectExit and for some reason I get this weird behavior:
- In socket: Kinematic
- Near far interactor grabs it from socket: Not kinematic
- Released from near far interactor: Goes back to being kinematic
This also only happens when the interactable select mode is set to multiple.
Hi @jlorenzi. What version of XRI are you using?
I tested this in XRI 3.4 using the Hands Interaction Demo and I modified the XRGrabInteractable to be velocity tracked and select mode multiple and the rigid body isKinematic went back to false when removed from the socket.
Could you please provide the version of XRI you are using and if you have a repro project or any other steps, please provide that as well.
Hi all,
For me this happens using XR Interaction Toolkit 3.2.2 in a project started in the VR Template, Unity 6.2.
If a Grab Interactable with movement type Kinematic or Velocity Tracking is placed in a socket, once it is removed it has the Rigidbody’s isKinematic property set to true (so the object “hovers” mid-air when dropped, and there are also warnings from the Interaction Manager on the console, regarding the object not being throwable since it is set to be kinematic). This does not happen if the Grab Interactable’s movement type is set to Instantaneous.
Now I am wondering if either interactor (Socket or Near-Far) is failing to restore the Interactable’s physics state properly (i.e. the isKinematic property) or if this is a conflict generated from switching interactors - e.g. the Near/Far interactor, as it selects the interactable from the socket records it’s original state, with isKinematic = true because it is selected by the socket (?).
As a workaround, using the XR Grab Interactable’s Last Select Exited event to set the Rigidbody’s isKinematic and useGravity to true seems to do the trick.
3.3.0.
I should mention I did find a workaround by using onSelectExit on the NearFarInteractor and setting the interactable objects rigidbody to be non kinematic and use gravity, but this is still weird behavior.
I believe this is due to a bug that was introduced with version 3.2.0 that has been fixed in 3.3.1 (currently public) and 3.4.0 (not yet public). Try updating your version of the package to 3.3.1 so you don’t have to use your workaround.