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

Interactors with multiple collider objects enabled/disabled breaks untouch events. #130

Open Fairennuff opened 2 years ago

Fairennuff commented 2 years ago

Environment

Steps to reproduce

Create an interactable and place an interactor on your left/right hand alias. Also helps to add a distance grabber as its easy to see the issue occur.

Use the example avatar as the main collider for the interactor. Duplicate it and change the color of the default box so you can tell the different between the 2 colliders. Enter play mode and grab the object. Now turn off the default example avatar and enable the duplicate. Create a script that logs something to the console when an interactable is ungrabbed and add it to the interactable.

The same issue occurs if you have 2 separate collider objects on the interactor, even if they stay active. For example if you have a collider on a game object for the palm of your hand and then a second for your index finger. If you start a touch with your index finger and then initiate a grab and the object snaps to your palm, when you ungrab the object because its no longer touching the index finger the untouch event is never called.

Expected behavior

When ungrabbing untouch events should be called on the interactable. No matter what collider on the interactor stops touching the interactable, so long as no other colliders on the interactor are touching it, the untouch event should be called.

Current behavior

Untouch events are not called because the original collider is no longer active or touching the collider.

And sorry in advance - I realize this is probably somewhere in a grey area between bug report/feature request...