Changement gestion colliosn sol dans player

This commit is contained in:
Amaury
2020-04-21 10:02:16 +02:00
parent 00e7b7d658
commit e1ce1e5f0d

View File

@ -70,12 +70,10 @@ void GestionPlayer::traitementInput()
if (i->is_action_pressed("ui_select")) if (i->is_action_pressed("ui_select"))
saut(); saut();
if (is_on_floor()) { if (on_ground) {
on_ground = true;
p.velocity.y += 0; p.velocity.y += 0;
} }
else { else {
on_ground = false;
p.velocity.y += gravity; p.velocity.y += gravity;
} }
} }