From 194645880748bf0eaca40729d5ef476b8345d48c Mon Sep 17 00:00:00 2001 From: zefad Date: Sun, 20 Sep 2026 17:39:13 +0200 Subject: [PATCH] bounds issue fixed --- src/gameplay/bounds.rs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/gameplay/bounds.rs b/src/gameplay/bounds.rs index 751d37c..a4f85fc 100644 --- a/src/gameplay/bounds.rs +++ b/src/gameplay/bounds.rs @@ -2,7 +2,10 @@ use bevy::prelude::*; use crate::{ config::HALF_TERRAIN_WIDTH, - gameplay::{collision::Collider, player::Player}, + gameplay::{ + collision::Collider, + player::{Player, move_player}, + }, states::GameState, }; @@ -18,6 +21,11 @@ pub struct BoundsPlugin; impl Plugin for BoundsPlugin { fn build(&self, app: &mut App) { - app.add_systems(Update, constrain_player.run_if(in_state(GameState::InGame))); + app.add_systems( + Update, + constrain_player + .after(move_player) + .run_if(in_state(GameState::InGame)), + ); } }