camera shaking good
Some checks failed
Build Bevy Game (Linux + Windows) / build-windows (push) Successful in 19m29s
Build Bevy Game (Linux + Windows) / build-linux (push) Has been cancelled

This commit is contained in:
Crizomb 2025-12-30 18:21:53 +01:00
parent ee8799c324
commit 329cd173b9
3 changed files with 4 additions and 2 deletions

View file

@ -13,7 +13,7 @@ pub struct MyCamera {
pub fn spawn_camera(mut commands: Commands) {
let mycam = commands
.spawn((
MyCamera { shaking_intensity_factor: 10.0, shaking_reset_speed: 0.1 },
MyCamera { shaking_intensity_factor: 10.0, shaking_reset_speed: 100.0 },
Transform::from_translation(Vec3::ZERO),
))
.id();
@ -39,7 +39,7 @@ pub fn camera_shake(
child_translation -= child_translation * parent.shaking_reset_speed * time.delta_secs();
child_transform.translation.x = child_translation.x;
child_transform.translation.y = child_translation.y;
// println!("{:?}", child_transform.translation);
println!("{:?}", child_transform.translation);
}
pub struct MyCameraPlugin;