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

Disallowed interactor causing offset issue #175

Open olemid opened 2 months ago

olemid commented 2 months ago

NOTE: Any issue that does not follow the below template will be immediately closed and not re-opened until the template structure is adhered to.

Environment

Unity 2021.3.16f

Steps to reproduce

Video demo of issue

Expected behavior

Right controller should not be impacted by disallowed interactor

Current behavior

Interacting with left hand creates issue with right hand

thestonefox commented 2 months ago

The issue seems to be the FollowAction->TargetOffsets gets set to the Left Interactor Precision collision point container on grab, even though that shouldn't happen.

thestonefox commented 2 months ago

So once the collision point is set as a TargetOffset, it means the next correct grab won't use precision point grabbing because a detached offset exists.

The solution will be to prevent the precision point from being created if the interactor is disallowed

thestonefox commented 2 months ago

So the issue is the GrabValidityChecks only turn off the GrabTypes and don't prevent the OutputActiveCollisionConsumer from being called, which is what is setting up the detached offset on the disallowed controller.

The fix is to first disable the OutputActiveCollisionConsumer if the disallowed interactor rule passes:

image

And then ensure it's re-enabled

image

thestonefox commented 2 months ago

PR with fix https://github.com/ExtendRealityLtd/Tilia.Interactions.Interactables.Unity/pull/176