fixed bug for platfrom

This commit is contained in:
Vasyl Kazakov
2026-06-19 11:56:35 +03:00
parent ce3f254bc1
commit f922fd53ae
4 changed files with 14 additions and 4965 deletions
+2 -11
View File
@@ -10,7 +10,7 @@ import { InteractiveZoneC } from "./InteractiveZoneC";
import { ToolZoneC } from "./ToolZoneC";
const MAP_PHYSICS_LAYERS = ["Colliders", "Lootable"];
const GATHER_TRIGGER_PADDING = 0.5;
const GATHER_TRIGGER_PADDING = 0.15;
export class Map {
static init() {
@@ -48,8 +48,8 @@ export class Map {
}
if (layerName === "Colliders") {
// Floor-only layer (BoxCollider): hide in scene, no physics needed.
layer.visible = false;
this.addWallPhysics(layer);
continue;
}
@@ -59,15 +59,6 @@ export class Map {
}
}
private static addWallPhysics(root: Object3D) {
root.traverse((child) => {
if (child === root) return;
if ((child as Mesh).isMesh) {
new PhysicsBody(child, false, 0, PhysicsLayer.Wall, PhysicsLayer.Player);
}
});
}
private static setupLootableObject(lootableObject: Object3D) {
const propType = resolvePropType(lootableObject.name);
const damageLayers = findDamageStateLayers(lootableObject);