showing what is placeable or not
This commit is contained in:
@@ -49,7 +49,10 @@ export class SpatialGrid {
|
||||
const maxZ = z + rotatedD / 2;
|
||||
|
||||
const [minCx, minCz] = this.posToCell(minX, minZ);
|
||||
const [maxCx, maxCz] = this.posToCell(maxX, maxZ);
|
||||
// Use exclusive upper bound: subtract epsilon so exact boundaries don't overlap
|
||||
// This allows adjacent items (touching but not overlapping) to not conflict
|
||||
const epsilon = 1e-6;
|
||||
const [maxCx, maxCz] = this.posToCell(maxX - epsilon, maxZ - epsilon);
|
||||
|
||||
const keys: CellKey[] = [];
|
||||
for (let cx = minCx; cx <= maxCx; cx++) {
|
||||
|
||||
@@ -11,7 +11,6 @@ export function useSpatialQuery() {
|
||||
rotation: [number, number, number],
|
||||
ignoreIds?: string[],
|
||||
) => {
|
||||
console.log("spatialGridManager in useSpatialQuery:", spatialGridManager);
|
||||
return spatialGridManager.canPlaceOnFloor(
|
||||
levelId,
|
||||
position,
|
||||
|
||||
Reference in New Issue
Block a user