mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-04-17 17:43:52 +00:00
Halve mount rider bob frequency to one bounce per stride
This commit is contained in:
parent
35fff9307d
commit
2fb01abcaa
1 changed files with 2 additions and 2 deletions
|
|
@ -536,8 +536,8 @@ void Renderer::updateCharacterAnimation() {
|
||||||
// Rider bob: sinusoidal motion synced to mount's run animation
|
// Rider bob: sinusoidal motion synced to mount's run animation
|
||||||
if (moving && haveMountState && curMountDur > 1.0f) {
|
if (moving && haveMountState && curMountDur > 1.0f) {
|
||||||
float norm = std::fmod(curMountTime, curMountDur) / curMountDur;
|
float norm = std::fmod(curMountTime, curMountDur) / curMountDur;
|
||||||
// Two bounces per stride cycle (horse gait), lowest at footfalls (0.22, 0.72)
|
// One bounce per stride cycle
|
||||||
mountBob = std::sin(norm * 4.0f * 3.14159f) * 0.12f;
|
mountBob = std::sin(norm * 2.0f * 3.14159f) * 0.12f;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue