Back to Aframe

vive-controls

docs/components/vive-controls.md

1.7.12.0 KB
Original Source

The vive-controls component interfaces with the HTC Vive controllers/wands. It wraps the tracked-controls component while adding button mappings, events, and a Vive controller model that highlights the pressed buttons (trigger, grip, menu, system) and trackpad.

Example

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

Value

PropertyDescriptionDefault Value
buttonColorButton colors when not pressed.#FAFAFA (off-white)
buttonHighlightColorButton colors when pressed and active.#22D1EE (light blue)
handThe hand that will be tracked (i.e., right, left).left
modelWhether the Vive controller model is loaded.true

Events

Event NameDescription
gripdownGrip button pressed.
gripupGrip button released.
gripchangedGrip button changed.
menudownMenu button pressed.
menuupMenu button released.
menuchangedMenu button changed.
systemdownSystem button pressed.
systemupSystem button released.
systemchangedSystem button changed.
trackpaddownTrackpad pressed.
trackpadupTrackpad released.
trackpadchangedTrackpad button changed.
triggerdownTrigger pressed.
triggerupTrigger released.
triggerchangedTrigger changed.

Assets