Skip to content

Commit

Permalink
Tweaks player movement physics values to account for smaller Collider
Browse files Browse the repository at this point in the history
  • Loading branch information
mnmaita committed Nov 18, 2023
1 parent 505e150 commit 4d63abc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/game/player.rs
Original file line number Diff line number Diff line change
Expand Up @@ -115,15 +115,15 @@ fn handle_player_movement_events(
let angle = target_to_player_vector.angle_between(direction);

*damping = Damping::default();
external_impulse.impulse = direction * velocity_scalar * 1000.;
external_impulse.impulse = direction * velocity_scalar * 125.;

let (torque, strafe) = {
if is_in_cruise_mode {
external_impulse.impulse *= 2.;
damping.angular_damping = 10.;
(0., Vec2::ZERO)
} else {
(-angle * 250., direction.perp() * -angle * 125_000.)
(-angle * 75., direction.perp() * -angle * 31250.)
}
};

Expand Down

0 comments on commit 4d63abc

Please sign in to comment.