mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-23 07:40:14 +00:00
feat: implement SMSG_CAMERA_SHAKE with sinusoidal camera shake effect
- Add triggerShake(magnitude, frequency, duration) to CameraController - Apply envelope-decaying sinusoidal XYZ offset to camera in update() - Handle SMSG_CAMERA_SHAKE opcode in GameHandler dispatch - Translate shakeId to magnitude (minor <50: 0.04, larger: 0.08 world units) - Wire CameraShakeCallback from GameHandler through to CameraController - Shake uses 18Hz oscillation with 30% fade-out envelope at end of duration
This commit is contained in:
parent
214c1a9ff8
commit
9aa4b223dc
5 changed files with 70 additions and 0 deletions
|
|
@ -646,6 +646,11 @@ void Application::setState(AppState newState) {
|
|||
renderer->getCameraController()->applyKnockBack(vcos, vsin, hspeed, vspeed);
|
||||
}
|
||||
});
|
||||
gameHandler->setCameraShakeCallback([this](float magnitude, float frequency, float duration) {
|
||||
if (renderer && renderer->getCameraController()) {
|
||||
renderer->getCameraController()->triggerShake(magnitude, frequency, duration);
|
||||
}
|
||||
});
|
||||
}
|
||||
// Load quest marker models
|
||||
loadQuestMarkerModels();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue