Editar

Partilhar via


ConeCastUtility.ConeCastAll Method

Definition

Function casts a sphere along a ray and checks if the hitpoint is within the angle of the cone and returns detailed information.

public:
 static cli::array <Microsoft::MixedReality::Toolkit::Physics::ConeCastUtility::ConeCastHit> ^ ConeCastAll(UnityEngine::Vector3 origin, UnityEngine::Vector3 direction, float maxRadius, float maxDistance, float coneAngle, UnityEngine::LayerMask layerMask);
public static Microsoft.MixedReality.Toolkit.Physics.ConeCastUtility.ConeCastHit[] ConeCastAll (UnityEngine.Vector3 origin, UnityEngine.Vector3 direction, float maxRadius, float maxDistance, float coneAngle, UnityEngine.LayerMask layerMask);
static member ConeCastAll : UnityEngine.Vector3 * UnityEngine.Vector3 * single * single * single * UnityEngine.LayerMask -> Microsoft.MixedReality.Toolkit.Physics.ConeCastUtility.ConeCastHit[]
Public Shared Function ConeCastAll (origin As Vector3, direction As Vector3, maxRadius As Single, maxDistance As Single, coneAngle As Single, layerMask As LayerMask) As ConeCastUtility.ConeCastHit()

Parameters

origin
UnityEngine.Vector3

The vertex of the cone and the at the start of the sweep.

direction
UnityEngine.Vector3

The direction into which to sweep the sphere..

maxRadius
Single

The radius of the sweep.

maxDistance
Single

The max length of the cast.

coneAngle
Single

The angle used to define the cone.

layerMask
UnityEngine.LayerMask

A Layer mask that is used to selectively ignore colliders when casting a capsule.

Returns

An array of structs that contain RaycastHit, distance to hit, and the angle of all the objects that were hit.

Applies to