Skip to content

Commit

Permalink
Move systems to PostUpdate (#3)
Browse files Browse the repository at this point in the history
I'm experiencing a little bit of jitter when having the camera track an
object as it moves. I believe it's because the object's transform is
updated, then the pixel camera plugin systems run, and then my camera
tracking system runs, causing there to be a one-frame delay before the
pixel camera's transform gets updated. This PR fixes it for me.

I believe it's correct to put these systems in `PostUpdate`, but I could
also make do with a `SystemSet` for these two if you prefer that.
  • Loading branch information
msvbg authored Feb 15, 2024
1 parent 4d4fb43 commit 610baee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ impl Plugin for PixelCameraPlugin {
use crate::systems::*;

app.insert_resource(Msaa::Off).add_systems(
Update,
PostUpdate,
(
init_camera,
update_viewport_size,
Expand Down

0 comments on commit 610baee

Please sign in to comment.