UxrLocomotion.HasBlockingRaycastHit Method
Checks whether a raycast has anything that is blocking. It filters out invalid raycasts such as against anything part of the avatar or a grabbed object.
Namespace: UltimateXR.Locomotion
Assembly: UltimateXR (in UltimateXR.dll) Version: 0.0.0.0
Syntax
C#
protected bool HasBlockingRaycastHit(
UxrAvatar avatar,
Vector3 origin,
Vector3 direction,
float maxDistance,
int layerMaskRaycast,
QueryTriggerInteraction queryTriggerInteraction,
out RaycastHit outputHit
)
Parameters
- avatar
- Type: UltimateXR.Avatar.UxrAvatar
The avatar to compute the raycast for - origin
- Type: Vector3
Ray origin - direction
- Type: Vector3
Ray direction - maxDistance
- Type: System.Single
Raycast maximum distance - layerMaskRaycast
- Type: System.Int32
Raycast layer mask - queryTriggerInteraction
- Type: QueryTriggerInteraction
Behaviour against trigger colliders - outputHit
- Type: RaycastHit
Result blocking raycast
Return Value
Type: Boolean
Whether there is a blocking raycast returned in outputHit