当前位置: 首页 > 文档资料 > A-Frame 中文文档 >

hand-controls

优质
小牛编辑
133浏览
2023-12-01

The hand-controls gives tracked hands (using a prescribed model) with animated gestures. hand-controls wraps the vive-controlsand oculus-touch-controlscomponents, which in turn wrap the tracked-controls component. The component gives extra events and handles hand animations and poses.

Example

            
              <
                a-entity
                hand-controls=
                "left">
              </
                a-entity>
            
              <
                a-entity
                hand-controls=
                "right">
              </
                a-entity>
          

Values

ValueDescription
leftThe entity will track the left hand controller.
rightThe entity will track the right hand controller.

Events

Event NameDescription
gripcloseThe hand is closed into a fist without thumb raised.
gripopenThe hand is no longer closed into a fist without thumb raised.
pointupThe hand is touching or pressing the trigger only.
pointdownThe hand is no longer touching or pressing the trigger only.
thumbupThe hand is closed into a fist with thumb raised.
thumbdownThe hand is no longer closed into a fist with thumb raised.
pointingstartThe hand is pointing with index finger without thumb raised.
pointingendThe hand is no longer pointing without thumb raised.
pistolstartThe hand is pointing with index finger and thumb raised.
pistolendThe hand is no longer pointing with thumb raised.

Assets