SpatialInteractionSourceState.IsPressed Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets whether a hand or motion controller is experiencing any press.
public:
property bool IsPressed { bool get(); };
bool IsPressed();
public bool IsPressed { get; }
var boolean = spatialInteractionSourceState.isPressed;
Public ReadOnly Property IsPressed As Boolean
Property Value
bool
Whether the source is experiencing any press.
Remarks
This can be because a hand has a finger pressed or a motion controller has any button pressed.
To determine which specific presses are occurring, inspect the state's more specific properties such as IsSelectPressed, IsMenuPressed or IsGrasped. If this source is a motion controller, there are further controller-specific properties to inspect within the state's ControllerProperties.
Note that a voice "Select" causes an instant press and release, and so you cannot poll for a voice press using IsPressed, IsSelectPressed or SelectPressedValue. Instead, use a SpatialGestureRecognizer and handle the Tapped event, or handle the SourcePressed event.