|
2D Platform Controller
v1.7.0
Autogenerated code documentation for the 2D Platform Controller.
|
Ledge details. Control what happens when you hang off a ledge. More...
Public Attributes | |
| bool | canLedgeHang = true |
| Can character hang and climb ledge. More... | |
| bool | autoGrab |
| If true the character will try to grab ledges near them without user input. If false the user needs to hold towards the ledge to grab. More... | |
| float | autoGrabDistance = 0.1f |
| The distance used to calcualte autograbs, should be very small or else the character will grab ledges when they shouldn't be able to. More... | |
| Vector2 | edgeDetectionOffset |
| When a ledge hang starts the edge detection offset is added to the ledge hang raycast and if an impassable object is detected it will cancel the hang. Note the y value is the y offset but that the x value is used as a scalar distance (i.e. changes based on direction). More... | |
| bool | jumpOnlyInOppositeDirection = true |
| If false the character can jump directly upwards from a ledge hang. Otherwise More... | |
| float | oppositeDirectionTime = 0.5f |
| The time where user input is ingored in the x direction when wall jupming away from a ledge. More... | |
| float | jumpVelocity = 7.0f |
| Velocity imparted by a jump from a ledge hang. If this is zero jump will simply cause the cahracter to fall from the ledge (and the jump animation will not be played). More... | |
| Vector3 | hangOffset |
| The point where the character hangs from. More... | |
| float | graspPoint = 0.4f |
| How far above the highest collider is the grasp point (i.e. the cahracters hands when grasping for a ledge). More... | |
| float | graspLeeway = 0.1f |
| How much leeway to use when cacluating the grasp. A bigger number makes it easier to ledge hang, but it will looks incorrect if the value is too large. More... | |
| float | transitionTime |
| The time it takes to get to the hang position in seconds. More... | |
| float | climbTime |
| The time it takes to climb in seconds. More... | |
| Vector3 | climbOffset |
| The difference between the characters root position at the top of a climb, and during the normal state (idle, walking, etc). More... | |
| float | ledgeDropTime = 0.15f |
| The time after dropping off a ledge where feet colliders will be ignored.The lower the better but you may need to increase if you have tiled or complex geometry. More... | |
Ledge details. Control what happens when you hang off a ledge.
| bool LedgeDetails.autoGrab |
If true the character will try to grab ledges near them without user input. If false the user needs to hold towards the ledge to grab.
| float LedgeDetails.autoGrabDistance = 0.1f |
The distance used to calcualte autograbs, should be very small or else the character will grab ledges when they shouldn't be able to.
| bool LedgeDetails.canLedgeHang = true |
Can character hang and climb ledge.
| Vector3 LedgeDetails.climbOffset |
The difference between the characters root position at the top of a climb, and during the normal state (idle, walking, etc).
| float LedgeDetails.climbTime |
The time it takes to climb in seconds.
| Vector2 LedgeDetails.edgeDetectionOffset |
When a ledge hang starts the edge detection offset is added to the ledge hang raycast and if an impassable object is detected it will cancel the hang. Note the y value is the y offset but that the x value is used as a scalar distance (i.e. changes based on direction).
| float LedgeDetails.graspLeeway = 0.1f |
How much leeway to use when cacluating the grasp. A bigger number makes it easier to ledge hang, but it will looks incorrect if the value is too large.
| float LedgeDetails.graspPoint = 0.4f |
How far above the highest collider is the grasp point (i.e. the cahracters hands when grasping for a ledge).
| Vector3 LedgeDetails.hangOffset |
The point where the character hangs from.
| bool LedgeDetails.jumpOnlyInOppositeDirection = true |
If false the character can jump directly upwards from a ledge hang. Otherwise
| float LedgeDetails.jumpVelocity = 7.0f |
Velocity imparted by a jump from a ledge hang. If this is zero jump will simply cause the cahracter to fall from the ledge (and the jump animation will not be played).
| float LedgeDetails.ledgeDropTime = 0.15f |
The time after dropping off a ledge where feet colliders will be ignored.The lower the better but you may need to increase if you have tiled or complex geometry.
| float LedgeDetails.oppositeDirectionTime = 0.5f |
The time where user input is ingored in the x direction when wall jupming away from a ledge.
| float LedgeDetails.transitionTime |
The time it takes to get to the hang position in seconds.