Back to Aframe

windows-motion-controls

docs/components/windows-motion-controls.md

1.7.12.9 KB
Original Source

The windows-motion-controls component interfaces with any spatial controllers exposed through Windows Mixed Reality as Spatial Input Sources (such as Motion Controllers). It wraps the tracked-controls component while adding button mappings, events, and a controller model that highlights applies position/rotation transforms to the pressed buttons (trigger, grip, menu, thumbstick, trackpad) and moved axes (thumbstick and trackpad.)

Example

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

Value

PropertyDescriptionDefault Value
handThe hand that will be tracked (i.e., right, left).right
pairWhich pair of controllers, if > 2 are connected.0
modelWhether the controller model is loaded.true

Events

Event NameDescription
thumbstickdownThumbstick button pressed.
thumbstickupThumbstick button released.
thumbstickchangedThumbstick button changed.
thumbstickmovedThumbstick axis moved.
triggerdownTrigger pressed.
triggerupTrigger released.
triggerchangedTrigger changed.
gripdownGrip button pressed.
gripupGrip button released.
gripchangedGrip button changed.
menudownMenu button pressed.
menuupMenu button released.
menuchangedMenu button changed.
trackpaddownTrackpad pressed.
trackpadupTrackpad released.
trackpadchangedTrackpad button changed.
trackpadmovedTrackpad axis moved.
controllermodelreadyThe model file is loaded and completed parsing.

Assets

TBC.