Some speed tweaks

This commit is contained in:
Rendo 2025-11-15 20:34:58 +05:00
commit 1820df9f24
3 changed files with 5 additions and 4 deletions

View file

@ -66,7 +66,7 @@ pub fn spawn_projectile(
Sprite::from(sprite.0.clone()),
Collider::new(8.),
transform,
Velocity::moving(128.0, 0.0),
Velocity::moving(1024.0, 0.0),
))
.observe(observe_collision);
}

View file

@ -58,8 +58,9 @@ pub(super) fn player_movement_system(
movement_factor -= 1.0;
}
movable.linear_speed += (movement_factor * player.acceleration * time.delta_secs())
.clamp(-movable.max_linear_speed, movable.max_linear_speed);
movable.linear_speed = (movable.linear_speed
+ movement_factor * player.acceleration * time.delta_secs())
.clamp(-movable.max_linear_speed, movable.max_linear_speed);
movable.rotation_speed = rotation_factor * movable.max_rotation_speed;
}

View file

@ -55,7 +55,7 @@ impl Default for Velocity {
Self {
linear_speed: 0.,
rotation_speed: 0.,
max_linear_speed: 64.,
max_linear_speed: 512.,
max_rotation_speed: f32::to_radians(360.),
}
}