resolves #17
This commit is contained in:
@@ -144,13 +144,18 @@ class MazeObject {
|
||||
o[e].scale.set(scale, scale, scale)
|
||||
});
|
||||
this.mazeObject(def, room);
|
||||
const floorGeometry = new PlaneGeometry(bbox.r - bbox.l + 10*scale, bbox.f + 10*scale);
|
||||
|
||||
let floorSize = { width: (bbox.r - bbox.l + 10*scale)/2, height: 0.01, depth: (bbox.f + 10*scale)/2 }
|
||||
const floorGeometry = new PlaneGeometry(floorSize.width*2, floorSize.depth*2);
|
||||
const floor = new Mesh(floorGeometry,new MeshStandardMaterial({
|
||||
roughness: 0, metalness:1, color: 0x00ffff, side: DoubleSide
|
||||
}))
|
||||
floor.rotation.set(Math.PI/2, 0, 0)
|
||||
floor.position.set((bbox.l + bbox.r)/2, 0, bbox.f/2);
|
||||
root.add(floor);
|
||||
let pf = engine.physics.add({position: floor.position}, 'fixed', false, undefined, 'cuboid', floorSize)
|
||||
//pf.collider.setRestitution(0);
|
||||
//pf.collider.setTranslationWrtParent({x:0, y: -100, z:0})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user