generated from tipragot/rust
Improve mouse movement on the map #95
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue