From e9e7ccdc3b14f94919bad392d78404b67c194dfc Mon Sep 17 00:00:00 2001 From: aratama <16192627+aratama@users.noreply.github.com> Date: Tue, 11 Feb 2025 20:20:35 +0900 Subject: [PATCH] fix entity obstacle --- src/level/chunk.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/level/chunk.rs b/src/level/chunk.rs index 45dbb7b..4c7e96d 100644 --- a/src/level/chunk.rs +++ b/src/level/chunk.rs @@ -159,7 +159,7 @@ impl LevelChunk { Spawn::Bookshelf => { let entity_index = position_to_index(Vec2::new( entity.world_x.unwrap_or_default() as f32 + 8.0, - -entity.world_y.unwrap_or_default() as f32 + 8.0, + -entity.world_y.unwrap_or_default() as f32 - 8.0, )); navigation_grid.set( (entity_index.0 - min_x) as usize, @@ -168,7 +168,7 @@ impl LevelChunk { ); let entity_index2 = position_to_index(Vec2::new( entity.world_x.unwrap_or_default() as f32 + 24.0, - -entity.world_y.unwrap_or_default() as f32 + 8.0, + -entity.world_y.unwrap_or_default() as f32 - 8.0, )); navigation_grid.set( (entity_index2.0 - min_x) as usize,