Character Controller Pro  1.3.8
A 2D/3D character controller asset for the Unity Engine.
Lightbug.CharacterControllerPro.Core.CollisionInfo Class Reference

This class contains the collision information gathered from of all the different physics queries (raycast, capsuleCast, etc). This information is very important for movement prediction. More...

Public Member Functions

void Reset ()
 Resets all the fields to their default values. More...
 
void SetData (in HitInfo hitInfo, Vector3 upDirection, Vector3 displacement)
 Sets the fields values based on the character movement. More...
 
void SetData (in HitInfo hitInfo, Vector3 upDirection, Vector3 displacement, in HitInfo upperHitInfo, in HitInfo lowerHitInfo)
 Sets the fields values based on the character movement. More...
 

Public Attributes

HitInfo hitInfo
 The physics query data. More...
 
Vector3 displacement
 The available displacement obtained as the result of the collision test. By adding this vector to the character position, the result will represent the closest possible position to the hit surface. More...
 
float contactSlopeAngle
 The angle between the contact normal and the character up vector. More...
 
bool isAnEdge
 Flag that indicates if the character is standing on an edge or not. More...
 
bool isAStep
 Flag that indicates if the character is standing on an step or not. More...
 
Vector3 edgeUpperNormal
 Normal vector obtained from the edge detector upper ray. More...
 
Vector3 edgeLowerNormal
 Normal vector obtained from the edge detector lower ray. More...
 
float edgeUpperSlopeAngle
 Angle between the character up vector and the edge detector upper normal. More...
 
float edgeLowerSlopeAngle
 Angle between the character up vector and the edge detector lower normal. More...
 
float edgeAngle
 Angle between the edge detector upper normal and the edge detector lower normal. More...
 

Detailed Description

This class contains the collision information gathered from of all the different physics queries (raycast, capsuleCast, etc). This information is very important for movement prediction.

Member Function Documentation

◆ Reset()

void Lightbug.CharacterControllerPro.Core.CollisionInfo.Reset ( )
inline

Resets all the fields to their default values.

◆ SetData() [1/2]

void Lightbug.CharacterControllerPro.Core.CollisionInfo.SetData ( in HitInfo  hitInfo,
Vector3  upDirection,
Vector3  displacement 
)
inline

Sets the fields values based on the character movement.

◆ SetData() [2/2]

void Lightbug.CharacterControllerPro.Core.CollisionInfo.SetData ( in HitInfo  hitInfo,
Vector3  upDirection,
Vector3  displacement,
in HitInfo  upperHitInfo,
in HitInfo  lowerHitInfo 
)
inline

Sets the fields values based on the character movement.

Member Data Documentation

◆ contactSlopeAngle

float Lightbug.CharacterControllerPro.Core.CollisionInfo.contactSlopeAngle

The angle between the contact normal and the character up vector.

◆ displacement

Vector3 Lightbug.CharacterControllerPro.Core.CollisionInfo.displacement

The available displacement obtained as the result of the collision test. By adding this vector to the character position, the result will represent the closest possible position to the hit surface.

◆ edgeAngle

float Lightbug.CharacterControllerPro.Core.CollisionInfo.edgeAngle

Angle between the edge detector upper normal and the edge detector lower normal.

◆ edgeLowerNormal

Vector3 Lightbug.CharacterControllerPro.Core.CollisionInfo.edgeLowerNormal

Normal vector obtained from the edge detector lower ray.

◆ edgeLowerSlopeAngle

float Lightbug.CharacterControllerPro.Core.CollisionInfo.edgeLowerSlopeAngle

Angle between the character up vector and the edge detector lower normal.

◆ edgeUpperNormal

Vector3 Lightbug.CharacterControllerPro.Core.CollisionInfo.edgeUpperNormal

Normal vector obtained from the edge detector upper ray.

◆ edgeUpperSlopeAngle

float Lightbug.CharacterControllerPro.Core.CollisionInfo.edgeUpperSlopeAngle

Angle between the character up vector and the edge detector upper normal.

◆ hitInfo

HitInfo Lightbug.CharacterControllerPro.Core.CollisionInfo.hitInfo

The physics query data.

◆ isAnEdge

bool Lightbug.CharacterControllerPro.Core.CollisionInfo.isAnEdge

Flag that indicates if the character is standing on an edge or not.

◆ isAStep

bool Lightbug.CharacterControllerPro.Core.CollisionInfo.isAStep

Flag that indicates if the character is standing on an step or not.


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