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

Grabbable not working properly if parent is rotated #218

Open
jdjuli opened this issue Mar 10, 2022 · 2 comments
Open

Grabbable not working properly if parent is rotated #218

jdjuli opened this issue Mar 10, 2022 · 2 comments

Comments

@jdjuli
Copy link

jdjuli commented Mar 10, 2022

Hi!

While using the grabbable component without physics I found out that if the grabbed entity is a child of another entity which has an arbitrary orientation (throught rotation component), the grabbed entity doesn't follow the hands nor the cursor.

I've made a basic example to illustrate the problem (glitch scene & code). On it, you can't move the green box to the left side of the screen without moving arround.

By testing different rotations, I discovered that the displacement of the hands (or cursor) is applied locally to the grabbed entity without considering the transformations performed to it's parents.

I'm using the following versions:

  • A-Frame: 1.3.0
  • aframe-extras: 6.1.1
  • super-hands: 3.0.3
@wmurphyrd
Copy link
Member

I'm working on a new version of grabbable that acts more like reparenting using matrix multiplication

@jdjuli
Copy link
Author

jdjuli commented Mar 23, 2022

Thank you so much :)

Sorry for the late response. I've been searching through my notes and I found out this page that might be helpful:
https://tipsfordev.com/using-superhands-component-in-a-frame-is-it-possible-to-rotate-grabbed-objects-without-using-physics

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