-
Notifications
You must be signed in to change notification settings - Fork 74
max grab behavior attribute #149
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
max grab behavior attribute #149
Conversation
…axGrabbers is reached. Default is what it does now, which is nothing. Also added 'drop' which ends the grab with the the first hand currently grabbing so that the new hand can grab.
|
|
||
| if (Number.isFinite(this.data.maxGrabbers) && !grabAvailable && | ||
| this.grabbed && this.data.maxGrabBehavior === 'drop') { | ||
| this.grabbers[0].components['super-hands'].onGrabEndButton() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This would crash the component if it has button filtering enabled with a TypeError from trying to access properties on a null event detail.
https://github.com/wmurphyrd/aframe-super-hands-component/blob/master/reaction_components/prototypes/buttons-proto.js#L5
|
What's the different behavior that you're achieving here? The current default settings are designed to enable a smooth hand-to-hand pass. When a second hand starts grabbing, the original hand remains in control until that button is released, then then second hand takes over the grab. For example, watch this machinima test |
|
The desired behavior is to have the current hand holding the object immediately release it instead of requiring the initial hand to release first. So I see 3 options here:
|
|
closing this as I've opted to use a custom reaction-component that copies grabbable's behavior but adds additional functionality (including this). |
I have run
npm run test:machinima, and this patch passes all machinima tests: noadd property maxGrabBehavior to specify the behavior to follow when maxGrabbers is reached.
Default is what it does now, which is nothing. Also added 'drop' which ends the grab with the the first hand currently grabbing so that the new hand can grab.