-
-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Public events from the hand-controls component are not extensive and do not all have accurate names #4883
Comments
The events are documented in https://aframe.io/docs/1.2.0/components/hand-controls.html#events Which ones are not correct or missing? What headset are you using? Have you tried Chrome? Firefox is stuck in the old WebVR API. I recommend using Chrome if you can. |
I created a PR to solve this issue, but if there is anything wrong with my changes, I'd be happy to fix it. I will say though that the pointup and pointdown events seem oddly named given their description in the documentation, and there's probably a better way to describe that gesture (but I have no clue what to call it). |
Description: The hand-controls component emits events on certain animation triggers; however, the event name for the thumbUp animation is not accurate to the animation. There are also not events for each of the animation states, making it difficult to know the state of the hand.
The only truly relevant code is from the top of hand-controls.js
The event for starting/ending thumbUp animation (described in the comments above) is called pistol, but pistol would seem to fit the pointThumb animation much better. Additionally, there is no event at all for the pointThumb, open, or hold animations. Instead, lines 31-33 should be replaced with something like:
And the get getGestureEventName function (hand-controls.js, lines 397-412) should be
Or alternatively, getGestureEventName could always return the eventName with 'start' or 'end' concatenated at the end, since (with this change) switching from thumbUp to pointThumb would emit a thumbdown event despite the thumb staying up.
The text was updated successfully, but these errors were encountered: