Tweak: guests movement limit
This commit is contained in:
parent
c56e07b083
commit
862acfd07f
@ -6,7 +6,7 @@ import sceneFeatureManager from './SceneFeatureManager.js';
|
|||||||
// --- Scene dimensions for positioning ---
|
// --- Scene dimensions for positioning ---
|
||||||
const stageHeight = 1.5;
|
const stageHeight = 1.5;
|
||||||
const stageDepth = 5;
|
const stageDepth = 5;
|
||||||
const length = 25;
|
const length = 24;
|
||||||
const moveSpeed = 0.8;
|
const moveSpeed = 0.8;
|
||||||
const movementArea = { x: 15, z: length, y: 0, centerZ: -2 };
|
const movementArea = { x: 15, z: length, y: 0, centerZ: -2 };
|
||||||
const jumpChance = 0.01;
|
const jumpChance = 0.01;
|
||||||
@ -14,8 +14,8 @@ const jumpDuration = 0.3;
|
|||||||
const jumpHeight = 0.2;
|
const jumpHeight = 0.2;
|
||||||
const jumpVariance = 0.1;
|
const jumpVariance = 0.1;
|
||||||
const rushIn = false;
|
const rushIn = false;
|
||||||
const waitTimeBase = 10;
|
const waitTimeBase = 15;
|
||||||
const waitTimeVariance = 60;
|
const waitTimeVariance = 120;
|
||||||
|
|
||||||
// --- Guest Properties ---
|
// --- Guest Properties ---
|
||||||
const guestHeight = 1.8; // Approx height of the blob+head
|
const guestHeight = 1.8; // Approx height of the blob+head
|
||||||
@ -471,6 +471,12 @@ export class PartyGuests extends SceneFeature {
|
|||||||
}
|
}
|
||||||
} // End else (Standard Logic)
|
} // End else (Standard Logic)
|
||||||
|
|
||||||
|
// Virtual Barrier to prevent entering the stage
|
||||||
|
const movementAreaLimitZ = movementArea.centerZ - movementArea.z/2;
|
||||||
|
if (mesh.position.z < movementAreaLimitZ) {
|
||||||
|
mesh.position.z = movementAreaLimitZ;
|
||||||
|
}
|
||||||
|
|
||||||
// Update hands up timer
|
// Update hands up timer
|
||||||
if (guestObj.handsUpTimer > 0) {
|
if (guestObj.handsUpTimer > 0) {
|
||||||
guestObj.handsUpTimer -= deltaTime;
|
guestObj.handsUpTimer -= deltaTime;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user