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

oculus-touch-controls

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

The oculus-touch-controls component interfaces with the Oculus Touch controllers. It wraps the tracked-controls componentwhile adding button mappings, events, and a Touch controller model.

Example

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

Value

PropertyDescriptionDefault Value
handThe hand that will be tracked (i.e., right, left).left
modelWhether the Touch controller model is loaded.true
rotationOffsetOffset to apply to model rotation.0

Events

Event NameDescription
triggerdownTrigger pressed.
triggerupTrigger released.
triggertouchstartTrigger touched.
triggertouchendTrigger no longer touched.
thumbstickdownThumbstick pressed.
thumbstickupThumbstick released.
thumbsticktouchstartThumbstick touched.
thumbsticktouchendThumbstick no longer touched.
gripdownGrip button pressed.
gripupGrip button released.
griptouchstartGrip button touched.
griptouchendGrip button no longer touched.
AdownA button pressed.
AupA button released.
AtouchstartA button touched.
AtouchendA button no longer touched.
BdownB button pressed.
BupB button released.
BtouchstartB button touched.
BtouchendB button no longer touched.
XdownX button pressed.
XupX button released.
XtouchstartX button touched.
XtouchendX button no longer touched.
YdownY button pressed.
YupY button released.
YtouchstartY button touched.
YtouchendY button no longer touched.
menudownMenu button pressed.
menuupMenu button released.
systemdownSystem button pressed.
systemupSystem button released.

Assets