Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Distance grabbing from a snap zone does not transition #226

Open
thestonefox opened this issue May 3, 2022 · 3 comments
Open

Distance grabbing from a snap zone does not transition #226

thestonefox opened this issue May 3, 2022 · 3 comments

Comments

@thestonefox
Copy link
Member

If you try and distance grab an object that is snapped in a snap zone then it doesn't transition to the interactor, instead it waits the transition time then instantly snaps.

This is because the object is still snapped into the snap zone until the transition has ended and then the grab happens.

One workaround is to add a SnapZoneManager to the internals of the distance grabber and have it unsnap before the grab takes place.

image

At present, the PointerInteractors do not have a dependency on the Snap Zone and I'm not sure if forcing that dependency is the best solution long term, so I'll leave this as a workaround for now until I come across a better solution

@fight4dream
Copy link

in the pic it has a notify before grabbed, meaning it has a “before grabbed” event on the facade?
then the script dont need to be inside the distance grabber.

@thestonefox
Copy link
Member Author

yeah the script doesn't need to be in the distance grabber. but i kinda feel the distance grabber should just work with a snap zone without a user having to set anything up, but then on the other hand i dont like the idea the distance grabber needs to know about snap zones

@fight4dream
Copy link

pattern-wise, if two parts dont need to know each other, then it is the work of a mediator. or messaging.

i think the snapped interactable may be the key here. because it is snapped by the snapzone, the snapzone know of it. also the distance grabber want to grab it, the distance grabber know of it.
they snapzone and grabber dont know each other, but the interactable can send message saying i am being requested.

on the other hand, i feel like a snapzone is like an interactor. i could use an interactor in place of a snapzone if i dont care about the “highlight”. Then i am curious that, if the distance grabber have the same issue when it attempt to snatch it from another interactor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants