fixed bug for platfrom
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user