This component allows for using input devices for moving and jumping in a 2D side-view game, by applying velocity to it's dynamic RigidBody.
Suggested use:
To control a player in a 2D side-view game with platforms.
Examples found in: Project 4
| Components | |||
|---|---|---|---|
| Property | Type | Description | Default Value | Component Properties |
| Can Move | Boolean | Whether the character can move. | True |
| Can Jump | Boolean | Whether the character can jump. | True |
| Can Move While Jumping | Boolean | Whether the character can jump and move at the same time. | True |
| Can Move While Air Jumping | Boolean | Whether the character can move while air jumping. | True |
| Move Speed | Float | Velocity applied in the X axis when moving. | 2 |
| Max Speed | Vector 2 | Max velocity in the X and Y axis. | 30,30 |
| Deceleration | Float | Deceleration to be applied every frame (values from 0 to 1). | 0.2 | Jump Properties |
| Jump Input Mode | Platformer Jump Input Type | Determines how to handle jump input for the character. | PRESS |
| Allow Grace Jump | Boolean | Allow a single jump midair, even if midair jumps are allowed, if the player falls off a ledge. If midair jumps are allowed, the first jump used when falling off a ledge will not count towards a midair jump. | True |
| Jump Movement Deceleration | Float | Scalar to restrict movement while midair. Will scale with the amount of air jumps made. | 1 |
| Reduce Air Jump X Velocity | Boolean | Decrease velocity of left and right movement on subsequent jumps. | False |
| Reduce Air Jump Y Velocity | Boolean | Decrease velocity impact of subsequent jumps. | False |
| Jump Force | Float | Velocity on the Y axis applied when jumping. | 8 |
| Max Air Jumps | Int | Maximum number of allowed mid-air jumps. Air jumps are reset when grounded. | 0 |
| Feet Collider | Collider 2D | Mandatory collider to use for ground detection. If this collider touches any non trigger, other than the character it belongs to, then the character is grounded. | None | Input Properties |
| Horizontal | String | Virtual button used for horizontal movement. | Horizontal |
| Jump | String | Virtual button used for jumping. | Jump | Event Sending Info | Options |
| Character Jump Event | Event Conditions | Event sent when the character jumps. | N/A |
| Character Land Event | Event Conditions | Event sent when the character lands. | N/A | Values |
| Event | LPK Event Object | Event to dispatch when conditions are met.
|
None |
| Event Sending Mode | LPK Event Sending Mode | Who receives the event sent info when input is given from the input device. OWNER = only send to components on the same game object. ALL = send to all game objects. TAGS = send to specified tags. | TAGS | Debug Properties |
| Print Debug Info | Boolean | Toggle console debug messages. | False |
| Label | String | Notes for the user about this component. This does nothing to the game or build. | None |