Skip to content

Commit

Permalink
Merge pull request #45 from Lemonzyy/master
Browse files Browse the repository at this point in the history
Fix: pressing multiple keys increases velocity
  • Loading branch information
sburris0 authored Jul 18, 2024
2 parents d78e4bc + 9aa1f68 commit 63e8ba3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -130,11 +130,11 @@ fn player_move(
}
}
}
}

velocity = velocity.normalize_or_zero();
velocity = velocity.normalize_or_zero();

transform.translation += velocity * time.delta_seconds() * settings.speed
}
transform.translation += velocity * time.delta_seconds() * settings.speed
}
} else {
warn!("Primary window not found for `player_move`!");
Expand Down

0 comments on commit 63e8ba3

Please sign in to comment.