UxrLocomotion.HasBlockingCapsuleCastHit Method

Checks whether a capsule cast has anything that is blocking. It filters out invalid positives 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 HasBlockingCapsuleCastHit(
	UxrAvatar avatar,
	Vector3 point1,
	Vector3 point2,
	float radius,
	Vector3 direction,
	float maxDistance,
	int layerMask,
	QueryTriggerInteraction queryTriggerInteraction,
	out RaycastHit outputHit
)

Parameters

 

avatar
Type: UltimateXR.Avatar.UxrAvatar
The avatar to compute the capsule cast for
point1
Type: Vector3
The center of the sphere at the start of the capsule
point2
Type: Vector3
The center of the sphere at the end of the capsule
radius
Type: System.Single
The radius of the capsule
direction
Type: Vector3
The direction into which to sweep the capsule
maxDistance
Type: System.Single
The max length of the sweep
layerMask
Type: System.Int32
A that is used to selectively ignore colliders when casting a capsule
queryTriggerInteraction
Type: QueryTriggerInteraction
Specifies whether this query should hit Triggers
outputHit
Type: RaycastHit
Result blocking raycast

Return Value

Type: Boolean
Whether there is a blocking raycast returned in outputHit

See Also

Reference

UxrLocomotion Class
UltimateXR.Locomotion Namespace