mirror of
https://github.com/bevyengine/bevy
synced 2024-11-26 06:30:19 +00:00
Removed Mobile Touch event y-axis flip (#6597)
# Objective Fix android touch events being flipped. Only removed test for android, don't have ios device to test with. Tested with emulator and physical device. ## Solution Remove check, no longer needed with coordinate change in 0.9
This commit is contained in:
parent
2cd0bd7575
commit
cb8fe5b7fd
1 changed files with 1 additions and 9 deletions
|
@ -471,15 +471,7 @@ pub fn winit_runner_with(mut app: App) {
|
|||
}
|
||||
},
|
||||
WindowEvent::Touch(touch) => {
|
||||
let mut location = touch.location.to_logical(window.scale_factor());
|
||||
|
||||
// On a mobile window, the start is from the top while on PC/Linux/OSX from
|
||||
// bottom
|
||||
if cfg!(target_os = "android") || cfg!(target_os = "ios") {
|
||||
let window_height = windows.primary().height();
|
||||
location.y = window_height - location.y;
|
||||
}
|
||||
|
||||
let location = touch.location.to_logical(window.scale_factor());
|
||||
world.send_event(converters::convert_touch_input(touch, location));
|
||||
}
|
||||
WindowEvent::ReceivedCharacter(c) => {
|
||||
|
|
Loading…
Reference in a new issue