Method TryAddRaycast
TryAddRaycast(Vector2, float, out XRRaycast)
Attempts to add a new persistent raycast. The raycast will be updated automatically until
this subsystem is stopped or destroyed, or the the raycast is removed with
Remove
Declaration
public bool TryAddRaycast(Vector2 screenPoint, float estimatedDistance, out XRRaycast raycast)
Parameters
Type | Name | Description |
---|---|---|
Vector2 | screenPoint | A point on the screen, in normalized screen coorindates (0, 0)..(1, 1). |
float | estimatedDistance | The estimated distance to the raycast target. For example, an average human height might be used to estimate the distance to the floor. |
XRRaycast | raycast | The newly added raycast. All spatial data is relative to the session origin. |
Returns
Type | Description |
---|---|
bool |
|
TryAddRaycast(Ray, float, out XRRaycast)
Attempts to add a new persistent raycast. The raycast will be updated automatically until
this subsystem is stopped or destroyed, or the the raycast is removed with
Remove
Declaration
public bool TryAddRaycast(Ray ray, float estimatedDistance, out XRRaycast raycast)
Parameters
Type | Name | Description |
---|---|---|
Ray | ray | A ray relative to the session origin defining the raycast. |
float | estimatedDistance | The estimated distance to the raycast target. For example, an average human height might be used to estimate the distance to the floor. |
XRRaycast | raycast | The newly added raycast. All spatial data is relative to the session origin. |
Returns
Type | Description |
---|---|
bool |
|