Method TryGetCurrent3DRaycastHit
TryGetCurrent3DRaycastHit(out RaycastHit)
Gets the first 3D ray cast hit, if any ray cast hits are available.
Declaration
public bool TryGetCurrent3DRaycastHit(out RaycastHit raycastHit)
Parameters
| Type | Name | Description |
|---|---|---|
| RaycastHit | raycastHit | When this method returns, contains the ray cast hit if available; otherwise, the default value. |
Returns
| Type | Description |
|---|---|
| bool | Returns true if a hit occurred, implying the ray cast hit information is valid. Otherwise, returns false. |
TryGetCurrent3DRaycastHit(out RaycastHit, out int)
Gets the first 3D ray cast hit, if any ray cast hits are available.
Declaration
public bool TryGetCurrent3DRaycastHit(out RaycastHit raycastHit, out int raycastEndpointIndex)
Parameters
| Type | Name | Description |
|---|---|---|
| RaycastHit | 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. |