refactor: Add name to wall mesh for better identification in PolygonGenerator
This commit is contained in:
parent
95a98e131f
commit
879c478753
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue