|
2D Platform Controller
v1.7.0
Autogenerated code documentation for the 2D Platform Controller.
|
This script handles characters that don't have symmetrical colliders by flipping the colliders based on the direction the character it facing. It is important that you use the same method of checking direciton here that you use in your animator. More...
Inherits MonoBehaviour.
Public Member Functions | |
| virtual bool | UpdateDirection (RaycastCharacterController character) |
| Call to recalculate the direction. More... | |
Public Attributes | |
| int | startingDirection = 1 |
| The starting direction, if your character starts facing left or right make sure this is set to 1 for right or -1 for left. More... | |
Protected Member Functions | |
| virtual void | SwitchColliders (RaycastCharacterController character) |
Properties | |
| virtual int | CurrentDirection [get, set] |
| The current direction being faced. 0 = NONE, 1 = RIGHT -1 = LEFT. More... | |
This script handles characters that don't have symmetrical colliders by flipping the colliders based on the direction the character it facing. It is important that you use the same method of checking direciton here that you use in your animator.
You can extend this class to provide alternate functionality.
|
virtual |
Call to recalculate the direction.
true, if colliders were switched, false otherwise.| int DirectionChecker.startingDirection = 1 |
The starting direction, if your character starts facing left or right make sure this is set to 1 for right or -1 for left.
|
getset |
The current direction being faced. 0 = NONE, 1 = RIGHT -1 = LEFT.