fix: jump speed being incorrect
This commit is contained in:
parent
6fbdfaf863
commit
88e6017903
2 changed files with 2 additions and 2 deletions
|
|
@ -194,8 +194,7 @@ void JumpingState::state_entered() {
|
|||
Vector3 const current{this->get_body()->get_velocity()};
|
||||
Vector2 const impulse{this->get_body()->get_jump_impulse()};
|
||||
this->get_body()->set_velocity( (
|
||||
Vector3{current.x, impulse.y, current.z}
|
||||
+ current.normalized() * impulse.x
|
||||
Vector3{current.x * impulse.x, impulse.y, current.z * impulse.x}
|
||||
));
|
||||
this->get_body()->get_anim()->play("jump");
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue