slab polygons elevation

This commit is contained in:
wass08
2026-01-27 19:20:01 +09:00
parent 11aba2af36
commit 408fd8b87c
3 changed files with 214 additions and 6 deletions
@@ -32,9 +32,11 @@ export const ItemSystem = () => {
mesh.position.z = wallThickness / 2
}
} else if (!item.asset.attachTo) {
// Floor item: elevate by slab height
// Floor item: elevate by slab height (using full footprint overlap)
const levelId = resolveLevelId(item, nodes)
const slabElevation = spatialGridManager.getSlabElevationAt(levelId, item.position[0], item.position[2])
const slabElevation = spatialGridManager.getSlabElevationForItem(
levelId, item.position, item.asset.dimensions, item.rotation,
)
mesh.position.y = slabElevation
}