ExtendRealityLtd / VRTK

An example of how to use the Tilia packages to create great content with VRTK v4.
https://www.vrtk.io/
MIT License
3.69k stars 993 forks source link

fix(Interactions): remove invalid SnapZone collisions from interactable #2062

Closed thestonefox closed 5 years ago

thestonefox commented 5 years ago

It was possible for an Interactable collision list to be populated with a SnapZone due to the way the SnapZone forcibly populates the Interactable Collision list when checking if it can activate. On most occasions this is handled by the collision exit code, however on rare occasion it may forego this operation and mean the Interactable thinks it is still colliding with a SnapZone that it no longer is. This fix checks to see if the collision is valid and if it's not then it forcibly removes it to ensure the state is correct.