Interface IXRRayProvider
An interface that represents a Transform-driven XR Ray.
Namespace: UnityEngine.XR.Interaction.Toolkit.Interactors
Assembly: Unity.XR.Interaction.Toolkit.dll
Syntax
[MovedFrom("UnityEngine.XR.Interaction.Toolkit")]
public interface IXRRayProvider
Properties
rayEndPoint
The last endpoint of this ray, either its maximum distance or a collision point.
Declaration
Vector3 rayEndPoint { get; }
Property Value
Type | Description |
---|---|
Vector3 |
See Also
rayEndTransform
The Transform of the object this ray has collided with, if any.
Declaration
Transform rayEndTransform { get; }
Property Value
Type | Description |
---|---|
Transform |
See Also
Methods
GetOrCreateAttachTransform()
Ensures a Transform exists for the ray attach point and returns it.
Declaration
Transform GetOrCreateAttachTransform()
Returns
Type | Description |
---|---|
Transform | The Transform that is used as the attach point for Interactables. |
See Also
GetOrCreateRayOrigin()
Ensures a Transform exists for the ray origin and returns it.
Declaration
Transform GetOrCreateRayOrigin()
Returns
Type | Description |
---|---|
Transform | The Transform that is the starting position and direction of any ray casts. |
See Also
SetAttachTransform(Transform)
Assigns a Transform to be the attach point of this ray.
Declaration
void SetAttachTransform(Transform newAttach)
Parameters
Type | Name | Description |
---|---|---|
Transform | newAttach | The Transform that is used as the attach point for Interactables. |
See Also
SetRayOrigin(Transform)
Assigns a Transform to be the source of this ray.
Declaration
void SetRayOrigin(Transform newOrigin)
Parameters
Type | Name | Description |
---|---|---|
Transform | newOrigin | The Transform that is the starting position and direction of any ray casts. |