| Modifier and Type | Method and Description |
|---|---|
void |
reportAchievability(boolean achievable)
Reports whether the jump is achievable or not.
|
void |
takeoff(float maxVerticalVelocity,
float time)
This method is called to notify that both the position and velocity of the character are good enough to jump.
|
void reportAchievability(boolean achievable)
A jump is not achievable when the character's maximum linear velocity is not enough, in which case the jump behavior won't produce any acceleration; you might want to use pathfinding to plan a new path.
If the jump is achievable the run up phase will start immediately and the character will try to match the target velocity toward the takeoff point. This is the right moment to start the run up animation, if needed.
achievable - whether the jump is achievable or not.void takeoff(float maxVerticalVelocity,
float time)
maxVerticalVelocity - the velocity to set along the vertical axis to achieve the jumptime - the duration of the jump