Hello,
i’m currently struggling with my own SnapDropZone script, because objects inside of it are kinematic and should be resetted to non-kinematic after taking them out of it. I’m doing that by changing the rigidbody settings when leaving the collider of the snapdropzone. The problem is that the Interaction Toolkit is restoring the values the Gameobject had inside of the snapdropzone after dropping it, ignoring the changes i made while carrying it. I also tried to reset the values in the “Select Exited” event but it seems that this event is executed before the values are resetted. Is there any way to bypass the reset? Changing the code of the interaction toolkit is not possible because of work restrictions.
You can derive from XRGrabInteractable and override the SetupRigidbodyDrop method if you would like to change the behavior of it restoring the Rigidbody values to the values that were set on Grab. You should also be able to add a listener to the Select Exited event and override the Rigidbody properties as the Grab Interactable will have already restored the values before the event is invoked.
We will look into allowing for this behavior to be configured in the Inspector to allow users to set whether the Rigidbody properties will be modified upon grab/drop.
Thanks for the help, i used the listener and it works! Still looking forward to the inspector option.