UxrGrabbableObject.GetDistanceFromGrabber Method

Computes the distance from the object to a UxrGrabber, which is the component found in UxrAvatar hands that are able to grab objects.

Namespace: UltimateXR.Manipulation
Assembly: UltimateXR (in UltimateXR.dll) Version: 0.0.0.0

Syntax

C#

public void GetDistanceFromGrabber(
	UxrGrabber grabber,
	int grabPoint,
	out float distance,
	out float distanceWithoutRotation
)

Parameters

 

grabber
Type: UltimateXR.Manipulation.UxrGrabber
Grabber component
grabPoint
Type: System.Int32
Grab point index to compute the distance to
distance
Type: System.Single
Returns the distance, which is not be actual euclidean distance but a value that also takes into account the relative rotation between the grabber and the grab point. This helps favoring grabs that have a more convenient orientation to the grabber and are just a little farther away
distanceWithoutRotation
Type: System.Single
Returns the euclidean distance, without factoring in any relative rotation

See Also

Reference

UxrGrabbableObject Class
UltimateXR.Manipulation Namespace