Jumping delegates and variables.
By setting EnableJumping to true, the player can jump.
By settings canJumpWhileInAir to true, the player can jump while in the air. The more they jump, the higher they will go.
This is activated when the player presses the jump button.
- Parameters
-
PlayerFacing | The general direction the player is facing. |
JumpVector | Non normalized jump vector. The normalized value has been applied, multiplied by any configured jump force and JumpVector was the result value used. |
◆ PayerNotInTheAir()
delegate void RiverExplorer.Player.PlayerControl.PayerNotInTheAir |
( |
Facing | PlayerFacing, |
|
|
Moving | PlayerMoving, |
|
|
bool | OnGround ) |
◆ _PlayerPressedJump
bool RiverExplorer.Player.PlayerControl._PlayerPressedJump = false |
|
private |
The player pressed the JUMP action.
◆ CanJumpWhileInAir
bool RiverExplorer.Player.PlayerControl.CanJumpWhileInAir = false |
|
private |
When true, the player can jump while in the air. When false, the player can only jump when in contact with one of TagNamesOfGround entries.
◆ EnableJumping
bool RiverExplorer.Player.PlayerControl.EnableJumping = true |
◆ JumpingForce
float RiverExplorer.Player.PlayerControl.JumpingForce = 75.0f |
The amount of force to apply to the jump.
- Note
- The more mass the player has in any Rigidbody, the less (or more) this value must be adjusted.
◆ TagNamesOfGround
List<string> RiverExplorer.Player.PlayerControl.TagNamesOfGround |
|
private |
◆ IsOnGround
bool RiverExplorer.Player.PlayerControl.IsOnGround = false |
|
getprivate set |
This is a read-only variable that is true, when the player is in contact with one of the entries in TagNamesOfGround.