Skip to content

Commit

Permalink
fix: Update camera position before Rapier Transform Propagation
Browse files Browse the repository at this point in the history
  • Loading branch information
PraxTube committed Jan 20, 2024
1 parent 0adb94f commit a9c7ca0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/world/camera_shake.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
use chrono::Utc;

use bevy::prelude::*;
use bevy_rapier2d::plugin::RapierTransformPropagateSet;
use noisy_bevy::simplex_noise_2d_seeded;

use super::MainCamera;
Expand Down Expand Up @@ -79,6 +80,9 @@ impl Plugin for CameraShakePlugin {
fn build(&self, app: &mut App) {
app.add_systems(Update, (decay_shake_trauma,))
.init_resource::<CameraShake>()
.add_systems(PostUpdate, update_camera);
.add_systems(
PostUpdate,
update_camera.before(RapierTransformPropagateSet),
);
}
}

0 comments on commit a9c7ca0

Please sign in to comment.