Extensions.BoxCast

Extension Method in Extensions

Declaration

public static bool BoxCast(this UnityEngine.CharacterController character, Vector3 direction, out RaycastHit hit, float maxDistance, LayerMask layerMask)

Description

Performs a box cast from the character's position.

Parameters

characterThe character to perform the cast from.
directionThe direction to perform the cast.
hitThe resulting hit information.
maxDistanceThe max length of the cast.
layerMaskThe layer mask to use.

Returns

boolTrue if any intersections were found.