This commit is contained in:
2026-03-22 16:38:54 +00:00
parent e7a43457a3
commit 738f595f67
5 changed files with 73 additions and 20 deletions
+8 -1
View File
@@ -103,7 +103,7 @@ pub fn spawn_log_cargo(
Transform::from_translation(Vec3::new(
drop_pos.x as f32,
drop_pos.y as f32,
drop_pos.z as f32 + ITEM_Z_FIGHTING_OFFSET,
drop_pos.z as f32 - ITEM_Z_FIGHTING_OFFSET,
))
.with_scale(Vec3::splat(PIXEL_RATIO)),
Visibility::Visible,
@@ -111,6 +111,13 @@ pub fn spawn_log_cargo(
))
.id();
info!(
"spawn_log_cargo: tile_pos={:?} drop_pos={:?} entity_z={}",
tile_pos,
drop_pos,
drop_pos.z as f32 / 16.0 - 1.0
);
tilemap
.place_cargo(drop_pos, entity)
.expect("place_cargo failed after find_nearest_free_cargo_tile succeeded");