Improve mouse movement on the map #95

Merged
raphael merged 2 commits from upgrade-mouse-movement into main 2024-04-01 13:49:05 +00:00
Showing only changes of commit d07214b590 - Show all commits

View file

@ -127,7 +127,7 @@ fn mouse_movement_system(
if let Some(old_position) = *last_position {
for (mut transform, projection) in query.iter_mut() {
let offset = (old_position - position).extend(0.0) * Vec3::new(1., -1., 1.);
transform.translation += offset * projection.scale.sqrt();
transform.translation += offset * projection.scale;
}
*last_position = Some(position);
}