ExtendRealityLtd / Tilia.Interactions.Interactables.Unity

A variety of mechanisms for interacting between interactors and interactables in a spatial scene for the Unity software
MIT License
9 stars 3 forks source link

fix(Interactor): prevent double touch on force grab - fixes #128 #129

Closed thestonefox closed 2 years ago

thestonefox commented 2 years ago

When the Interactor Force Grab() method was being called it would first do a simulate touch (to ensure the events were in the right order). Then it would do the grab, which would make the interactable physically touch the interactor, which would call the touch logic again, therefore breaking the untouch logic and meaning the untouched event would not fire as it thought it was still being touched with the second touch that had happened.

This fix resolves that by when a simulate touch occurs, the Interactor then turns off the Interactable CollisionNotifier for a fixed update frame so the second touch cannot occur after the simulated touch.

ExtendReality-Bot commented 2 years ago

:tada: This PR is included in version 2.6.1 :tada:

The release is available on:

Your semantic-release bot :package::rocket: