Class CollisionInfoBase
Keeps track of the current frames collision information.
This is used in all character controllers to help with knowing when a collision action needs to be invoked.
for an example implementation.
Inheritance
System.Object
CollisionInfoBase
Assembly: cs.temp.dll.dll
Syntax
public abstract class CollisionInfoBase
Fields
CollisionActivated
Declaration
public bool CollisionActivated
Field Value
| Type |
Description |
| System.Boolean |
|
The threshold for the normals of a contact to pass to be considered an actual collision.
Declaration
public float CollisionContactThreshold
Field Value
| Type |
Description |
| System.Single |
|
Useful for removing ghost collisions and also collisions on physics shapes with rounded corners like capsules and circles.
ControlledGameObject
Declaration
public GameObject ControlledGameObject
Field Value
| Type |
Description |
| GameObject |
|
IsCollidingAbove
Keeps track if the current character controller using this collision info is colliding with anything above that matches any of it's collision mask filters.
Declaration
public bool IsCollidingAbove
Field Value
| Type |
Description |
| System.Boolean |
|
IsCollidingBelow
Keeps track if there is anything below that can make a contact point callback on collision.
Declaration
public bool IsCollidingBelow
Field Value
| Type |
Description |
| System.Boolean |
|
IsCollidingLeft
Keeps track if the current character controller using this collision info is colliding with anything on the left that matches any of it's collision mask filters.
Declaration
public bool IsCollidingLeft
Field Value
| Type |
Description |
| System.Boolean |
|
IsCollidingRight
Keeps track if the current character controller using this collision info is colliding with anything on the right that matches any of it's collision mask filters.
Declaration
public bool IsCollidingRight
Field Value
| Type |
Description |
| System.Boolean |
|
IsGrounded
Keeps track if the current character controller using this collision info is colliding with anything below that matches any of it platform collision filters.
Declaration
Field Value
| Type |
Description |
| System.Boolean |
|
OnCeilingCollidedHandler
Declaration
public Action OnCeilingCollidedHandler
Field Value
OnCollidedLeftHandler
Declaration
public Action OnCollidedLeftHandler
Field Value
OnCollidedRightHandler
Declaration
public Action OnCollidedRightHandler
Field Value
OnGroundedHandler
Declaration
public Action OnGroundedHandler
Field Value
StandingOnObject
Declaration
public GameObject StandingOnObject
Field Value
| Type |
Description |
| GameObject |
|
WasClimbing
Declaration
Field Value
| Type |
Description |
| System.Boolean |
|
WasCollidingAbove
Declaration
public bool WasCollidingAbove
Field Value
| Type |
Description |
| System.Boolean |
|
WasCollidingBelow
Declaration
public bool WasCollidingBelow
Field Value
| Type |
Description |
| System.Boolean |
|
WasCollidingLeft
Declaration
public bool WasCollidingLeft
Field Value
| Type |
Description |
| System.Boolean |
|
WasCollidingRight
Declaration
public bool WasCollidingRight
Field Value
| Type |
Description |
| System.Boolean |
|
WasGroundedLastFrame
Declaration
public bool WasGroundedLastFrame
Field Value
| Type |
Description |
| System.Boolean |
|
Properties
ClimbableSurface
Declaration
public ClimbableSurface ClimbableSurface { get; set; }
Property Value
Methods
CeilingChecks()
Declaration
public virtual void CeilingChecks()
CheckCollisions()
Declaration
public virtual void CheckCollisions()
CheckOnCollisionActions()
Checks to see what sides might have a new collision that was started the current frame. If a new collision is detected on the side invoke the action related to that sides collisions.
Declaration
protected virtual void CheckOnCollisionActions()
GroundCollisionChecks()
Declaration
public virtual void GroundCollisionChecks()
Initialize()
Declaration
public virtual void Initialize()
SideCollisionChecks()
Declaration
public virtual void SideCollisionChecks()