Struct CollisionInfo
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.
GroundedController2D for an example implementation.
Assembly: cs.temp.dll.dll
Syntax
[Serializable]
public struct CollisionInfo
Fields
BelowHit
The raycast hit detected during the ground collision check for below the character controller being used.
This will return false when checked if null in an if statement when there is nothing being hit.
Declaration
public RaycastHit2D BelowHit
Field Value
| Type |
Description |
| RaycastHit2D |
|
CeilingHit
The raycast hit detected during the ceiling collision check for the character controller being used.
This will return false when checked if null in an if statement when there is nothing being hit.
Declaration
public RaycastHit2D CeilingHit
Field Value
| Type |
Description |
| RaycastHit2D |
|
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 the current character controller using this collision info is colliding with anything below that matches any of it's collision mask filters.
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 |
|
LeftHit
The last raycast hit detected during the side collision check on the left side for the character controller being used.
This will return false when checked if null in an if statement when there is nothing being hit.
Declaration
public RaycastHit2D LeftHit
Field Value
| Type |
Description |
| RaycastHit2D |
|
OnCollidedAbove
Declaration
public Action OnCollidedAbove
Field Value
| Type |
Description |
| System.Action |
|
OnCollidedBelow
Declaration
public Action OnCollidedBelow
Field Value
| Type |
Description |
| System.Action |
|
OnCollidedLeft
Declaration
public Action OnCollidedLeft
Field Value
| Type |
Description |
| System.Action |
|
OnCollidedRight
Declaration
public Action OnCollidedRight
Field Value
| Type |
Description |
| System.Action |
|
RightHit
The raycast hit detected during the side collision check on the right side for the character controller being used.
This will return false when checked if null in an if statement when there is nothing being hit.
Declaration
public RaycastHit2D RightHit
Field Value
| Type |
Description |
| RaycastHit2D |
|
WasClimbing
Declaration
[NonSerialized]
public bool WasClimbing
Field Value
| Type |
Description |
| System.Boolean |
|
WasCollidingAbove
Declaration
[NonSerialized]
public bool WasCollidingAbove
Field Value
| Type |
Description |
| System.Boolean |
|
WasCollidingBelow
Declaration
[NonSerialized]
public bool WasCollidingBelow
Field Value
| Type |
Description |
| System.Boolean |
|
WasCollidingLeft
Declaration
[NonSerialized]
public bool WasCollidingLeft
Field Value
| Type |
Description |
| System.Boolean |
|
WasCollidingRight
Declaration
[NonSerialized]
public bool WasCollidingRight
Field Value
| Type |
Description |
| System.Boolean |
|
Properties
ClimbableSurface
Declaration
public ClimbableSurface ClimbableSurface { get; set; }
Property Value
ClimbableSurfaceHit
Declaration
public RaycastHit2D ClimbableSurfaceHit { get; set; }
Property Value
| Type |
Description |
| RaycastHit2D |
|