Aracılığıyla paylaş


SpatialPointerPose.TryGetInteractionSourcePose Method

Definition

Gets the pointer pose for a particular spatial interaction source, such as a motion controller, at a given timestamp.

public:
 virtual SpatialPointerInteractionSourcePose ^ TryGetInteractionSourcePose(SpatialInteractionSource ^ source) = TryGetInteractionSourcePose;
SpatialPointerInteractionSourcePose TryGetInteractionSourcePose(SpatialInteractionSource const& source);
public SpatialPointerInteractionSourcePose TryGetInteractionSourcePose(SpatialInteractionSource source);
function tryGetInteractionSourcePose(source)
Public Function TryGetInteractionSourcePose (source As SpatialInteractionSource) As SpatialPointerInteractionSourcePose

Parameters

source
SpatialInteractionSource

The spatial interaction source for which a pointer pose should be determined.

Returns

The interaction source pointer pose.

Windows requirements

Device family
Windows 10 Creators Update (introduced in 10.0.15063.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v4.0)

Remarks

The pointer pose represents the tip of a motion controller pointing forward. This pose is best used to raycast when pointing at UI when you are rendering the controller model itself.

To examine the grip pose of a motion controller, examine the Position and Orientation properties directly on a SpatialInteractionSourceLocation instance, available from SpatialInteractionSourceState.Properties.TryGetLocation.

This method will return null if the specified spatial interaction source does not support pointing (IsPointingSupported is false) or if the source did not have positional tracking at that moment.

Applies to

See also