Skip to content

Commit

Permalink
Fix: pressing multiple keys increases velocity
Browse files Browse the repository at this point in the history
  • Loading branch information
Lemonzyy committed Mar 30, 2024
1 parent baffe50 commit 9aa1f68
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 9aa1f68

Please sign in to comment.