diff --git a/party-cathedral/src/scene/medieval-musicians.js b/party-cathedral/src/scene/medieval-musicians.js index 2533867..d740717 100644 --- a/party-cathedral/src/scene/medieval-musicians.js +++ b/party-cathedral/src/scene/medieval-musicians.js @@ -224,7 +224,12 @@ export class MedievalMusicians extends SceneFeature { mesh.position.y = area.y + musicianHeight / 2; } } else { - if (Math.random() < jumpChance && musicianObj.state !== 'JUMPING_PLANE' && musicianObj.state !== 'PREPARING_JUMP') { + let currentJumpChance = jumpChance * deltaTime; // Base chance over time + if (state.music && state.music.beatIntensity > 0.8) { + currentJumpChance = 0.1; // High, fixed chance on the beat + } + + if (Math.random() < currentJumpChance && musicianObj.state !== 'JUMPING_PLANE' && musicianObj.state !== 'PREPARING_JUMP') { musicianObj.isJumping = true; musicianObj.jumpHeight = jumpHeight + Math.random() * jumpVariance; musicianObj.jumpStartTime = time;