Method TryGetCurrentARRaycastHit
TryGetCurrentARRaycastHit(out ARRaycastHit)
Declaration
public bool TryGetCurrentARRaycastHit(out ARRaycastHit raycastHit)
Parameters
| Type | Name | Description |
|---|---|---|
| ARRaycastHit | raycastHit |
Returns
| Type | Description |
|---|---|
| bool |
TryGetCurrentARRaycastHit(out ARRaycastHit, out int)
Gets the first AR ray cast hit, if any ray cast hits are available.
Declaration
public bool TryGetCurrentARRaycastHit(out ARRaycastHit raycastHit, out int raycastEndpointIndex)
Parameters
| Type | Name | Description |
|---|---|---|
| ARRaycastHit | raycastHit | When this method returns, contains the ray cast hit if available; otherwise, the default value. |
| int | raycastEndpointIndex | When this method returns, contains the index of the sample endpoint if a hit occurred.
Otherwise, a value of |
Returns
| Type | Description |
|---|---|
| bool | Returns true if a hit occurred, implying the ray cast hit information is valid. Otherwise, returns false. |
Remarks
If occludeARHitsWith2DObjects or occludeARHitsWith3DObjects are set to true and a
2D UI or 3D object are closer, the result will be false with the default values for both the raycastHit
and raycastEndpointIndex.