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

Add suppressX suppressZ to grabbable? #125

Open
SBUtltmedia opened this issue Mar 7, 2018 · 2 comments
Open

Add suppressX suppressZ to grabbable? #125

SBUtltmedia opened this issue Mar 7, 2018 · 2 comments

Comments

@SBUtltmedia
Copy link

Hi,
We're trying to adapt http://apps.tlt.stonybrook.edu/tarski/ to your excellent super-hands component.

We need a lever which only has freedom in the Y direction.

We modified https://github.com/wmurphyrd/aframe-super-hands-component/blob/master/reaction_components/grabbable.js to have functionality similar to suppressY but now we would need to keep a local version of this component and maintain it in case of further updates.

Is there a preferred way to extend grabbable without modifying the existing code?

I am unsure why suppresssY exists without the other axes, could we ask for a feature request to include suppresssX and suppresssZ ?

BTW we've already used super-hands on the following (only tested in Vive)

http://apps.tlt.stonybrook.edu/hanoi/

@wmurphyrd
Copy link
Member

Thanks for using super-hands. The reason I only added the suppressY option was it was all I needed at the time for a-locomotor. I'd be open to a pull request that added the other axes. (although, rather than added two more schema properties, I'd probably favor changing to a single suppress string property that could have any combination of x, y, and/or z, i.e. for your case it would be suppress: xz).

super-hands is also designed to be extensible with custom reaction components, so you could just copy the code for grabbable and register a new component under a different name that did exactly what you wanted.

Have you considered using physics simulation to power your lever interaction? I think you'd find a much more satisfying experience using aframe-physics-system and some constraints to get a nice lever action going. In my experience, however, the lock constraint that my grabbable component uses doesn't play too well with constrained objects; it works much better if alter it to use a point-to-point constraint with a small maximum force. Here's an example of a spinnable wheel made using that technique with a hinge constraint.

@omolds
Copy link

omolds commented Aug 21, 2018

Would love for this to happen!

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

3 participants