working zoom on mobile
This commit is contained in:
parent
2552d0dcdd
commit
f46536ecc8
10
Cargo.lock
generated
10
Cargo.lock
generated
@ -352,7 +352,6 @@ version = "0.15.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2eaad7fe854258047680c51c3cacb804468553c04241912f6254c841c67c0198"
|
||||
dependencies = [
|
||||
"bevy_dylib",
|
||||
"bevy_internal",
|
||||
]
|
||||
|
||||
@ -584,15 +583,6 @@ dependencies = [
|
||||
"sysinfo",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "bevy_dylib"
|
||||
version = "0.15.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "381b2a0773cfe9d27256fba1e5005a14968b34f751c09397ee4e278f0fb235db"
|
||||
dependencies = [
|
||||
"bevy_internal",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "bevy_ecs"
|
||||
version = "0.15.3"
|
||||
|
@ -36,7 +36,6 @@ bevy = { version = "0.15", default-features = false, features = [
|
||||
"png",
|
||||
"tonemapping_luts",
|
||||
"bevy_pbr",
|
||||
"dynamic_linking",
|
||||
] }
|
||||
#bevy-inspector-egui = { version = "0.28", default-features = false, features = [
|
||||
# "bevy_image",
|
||||
|
@ -86,7 +86,8 @@ fn setup(mut world: Commands, asset_server: Res<AssetServer>) {
|
||||
|
||||
if ptrs.0.len() > 1 {
|
||||
let forward = cam.forward();
|
||||
cam.translation += forward * (old_d_to_midpoint/new_d_to_midpoint * 0.1);
|
||||
let z = cam.translation.z;
|
||||
cam.translation += forward * (z * (1. - (new_d_to_midpoint/old_d_to_midpoint)) / forward.z);
|
||||
// cam.scale *= old_d_to_midpoint/new_d_to_midpoint;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user