refactor: Add name to wall mesh for better identification in PolygonGenerator

This commit is contained in:
Jerald-Golden-B 2025-05-29 13:58:32 +05:30
parent 95a98e131f
commit 879c478753
1 changed files with 2 additions and 1 deletions

View File

@ -44,7 +44,7 @@ export default function PolygonGenerator({
}); });
const polygons = turf.polygonize(turf.featureCollection(validLineFeatures)); const polygons = turf.polygonize(turf.featureCollection(validLineFeatures));
renderWallGeometry(wallPoints); renderWallGeometry(wallPoints);
if (polygons.features.length > 0) { if (polygons.features.length > 0) {
@ -115,6 +115,7 @@ export default function PolygonGenerator({
const quaternion = new THREE.Quaternion(); const quaternion = new THREE.Quaternion();
quaternion.setFromUnitVectors(new THREE.Vector3(1, 0, 0), direction); quaternion.setFromUnitVectors(new THREE.Vector3(1, 0, 0), direction);
wallMesh.quaternion.copy(quaternion); wallMesh.quaternion.copy(quaternion);
wallMesh.name = "agv-collider";
groupRef.current?.add(wallMesh); groupRef.current?.add(wallMesh);
} }