mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 12:08:54 +02:00
Add downward force on the hips to strech the spine.
This commit is contained in:
parent
36dc2dc49d
commit
fcc924ce8e
1 changed files with 4 additions and 0 deletions
|
@ -537,6 +537,10 @@ const AnimPoseVec& AnimInverseKinematics::overlay(const AnimVariantMap& animVars
|
||||||
additionalHipsOffset /= totalWeight;
|
additionalHipsOffset /= totalWeight;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Add downward pressure on the hips
|
||||||
|
additionalHipsOffset *= 0.95f;
|
||||||
|
additionalHipsOffset -= 1.0f;
|
||||||
|
|
||||||
// smooth transitions by relaxing _hipsOffset toward the new value
|
// smooth transitions by relaxing _hipsOffset toward the new value
|
||||||
const float HIPS_OFFSET_SLAVE_TIMESCALE = 0.10f;
|
const float HIPS_OFFSET_SLAVE_TIMESCALE = 0.10f;
|
||||||
float tau = dt < HIPS_OFFSET_SLAVE_TIMESCALE ? dt / HIPS_OFFSET_SLAVE_TIMESCALE : 1.0f;
|
float tau = dt < HIPS_OFFSET_SLAVE_TIMESCALE ? dt / HIPS_OFFSET_SLAVE_TIMESCALE : 1.0f;
|
||||||
|
|
Loading…
Reference in a new issue