Character Controller Pro 1.4.11
A 2D/3D character controller asset for Unity.
Lightbug.CharacterControllerPro.Core.CharacterCollisions Class Reference
Inheritance diagram for Lightbug.CharacterControllerPro.Core.CharacterCollisions:
Lightbug.CharacterControllerPro.Core.CharacterCollisions2D Lightbug.CharacterControllerPro.Core.CharacterCollisions3D

Public Member Functions

CollisionInfo CheckForGround (Vector3 position, float stepOffset, float stepDownDistance, in HitInfoFilter hitInfoFilter, HitFilterDelegate hitFilter=null)
 Checks vertically for the ground using a CastSphere.
 
CollisionInfo CheckForGroundRay (Vector3 position, in HitInfoFilter hitInfoFilter, HitFilterDelegate hitFilter=null)
 Checks vertically for the ground using a CastRay.
 
CollisionInfo CastBody (Vector3 position, Vector3 displacement, float bottomOffset, in HitInfoFilter hitInfoFilter, bool allowOverlaps=false, HitFilterDelegate hitFilter=null)
 Cast the current body shape a get the closest hit.
 
bool CheckOverlapWithLayerMask (Vector3 position, float bottomOffset, in HitInfoFilter hitInfoFilter, HitFilterDelegate hitFilter=null)
 Performs an overlap test at a given position.
 
bool CheckOverlap (Vector3 position, float bottomOffset, in HitInfoFilter hitInfoFilter, HitFilterDelegate hitFilter=null)
 Performs an overlap test at a given position. More...
 
bool CheckBodySize (Vector3 size, Vector3 position, in HitInfoFilter hitInfoFilter, HitFilterDelegate hitFilter=null)
 Checks if the character fits at a specific location.
 
bool CheckBodySize (Vector3 size, in HitInfoFilter hitInfoFilter, HitFilterDelegate hitFilter=null)
 Checks if the character fits in place.
 
void UpdateCollisionInfo (CollisionInfo collisionInfo, Vector3 position, in HitInfo hitInfo, Vector3 castDisplacement, float preDistance, bool calculateEdge=true, in HitInfoFilter hitInfoFilter=new HitInfoFilter())
 

Static Public Member Functions

static CharacterCollisions CreateInstance (GameObject gameObject)
 

Protected Member Functions

virtual void Awake ()
 

Protected Attributes

Transform Transform
 

Properties

HitInfo[] HitsBuffer = new HitInfo[20] [get, protected set]
 
CharacterActor CharacterActor [get]
 
PhysicsComponent PhysicsComponent [get, protected set]
 
abstract float ContactOffset [get]
 
abstract float CollisionRadius [get]
 

Member Function Documentation

◆ CheckOverlap()

bool Lightbug.CharacterControllerPro.Core.CharacterCollisions.CheckOverlap ( Vector3  position,
float  bottomOffset,
in HitInfoFilter  hitInfoFilter,
HitFilterDelegate  hitFilter = null 
)
inline

Performs an overlap test at a given position.

Parameters
positionTarget position.
bottomOffsetBottom offset of the capsule.
hitInfoFilterOverlap filter.
Returns
True if the overlap test detects some obstacle.

The documentation for this class was generated from the following file: