diff --git a/src/configUIParams/globalSettings.ts b/src/configUIParams/globalSettings.ts index 23e058c..3f56354 100644 --- a/src/configUIParams/globalSettings.ts +++ b/src/configUIParams/globalSettings.ts @@ -38,7 +38,6 @@ export const globalSettings: ConfigUiParamsCategories[] = [ name: "Camera position (portrait)", type: "float", array: true, - visible: "position", values: [ [ -10, @@ -96,7 +95,6 @@ export const globalSettings: ConfigUiParamsCategories[] = [ name: "Camera position (landscape)", type: "float", array: true, - visible: "position", values: [ [ -10, diff --git a/src/controllers/Camera/FollowCamera.ts b/src/controllers/Camera/FollowCamera.ts index e796cd3..c0dd36f 100644 --- a/src/controllers/Camera/FollowCamera.ts +++ b/src/controllers/Camera/FollowCamera.ts @@ -40,14 +40,17 @@ export class FollowCameraC { this.mainContainer.position.x += this.Offset.x; this.mainContainer.position.z += this.Offset.z; - this.cameraContainer.position.y += this.Offset.y; + this.cameraContainer.position.y = this.Offset.y; } private static update(delta: number) { if (!this.target.position) return; this.lookAheadTarget.copy(this.inputDirection).multiplyScalar(this.lookAheadAmount); - this.lookAheadCurrent.lerp(this.lookAheadTarget, delta * this.lookAheadLerpSpeed); + this.lookAheadCurrent.lerp( + this.lookAheadTarget, + Math.min(delta * this.lookAheadLerpSpeed, 1), + ); const offset = this.Offset; @@ -55,6 +58,8 @@ export class FollowCameraC { this.basePos.x += offset.x; this.basePos.z += offset.z; + this.cameraContainer.position.y = offset.y; + this.targetPos.copy(this.basePos); this.targetPos.x += this.lookAheadCurrent.x; this.targetPos.z += this.lookAheadCurrent.z; @@ -66,7 +71,11 @@ export class FollowCameraC { this.cameraContainer.lookAt(this.target.position); const lerpSpeed = 10; - this.mainContainer.position.lerpVectors(this.oldPos, this.targetPos, delta * lerpSpeed); + this.mainContainer.position.lerpVectors( + this.oldPos, + this.targetPos, + Math.min(delta * lerpSpeed, 1), + ); } static get RotationCorrection() { diff --git a/src/controllers/Map/Map.ts b/src/controllers/Map/Map.ts index 19d09d8..03eab23 100644 --- a/src/controllers/Map/Map.ts +++ b/src/controllers/Map/Map.ts @@ -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); diff --git a/stats.html b/stats.html deleted file mode 100644 index 73b9ec0..0000000 --- a/stats.html +++ /dev/null @@ -1,4949 +0,0 @@ - - - -
- - - -