mirror of
https://github.com/lubosz/overte.git
synced 2025-04-09 13:12:57 +02:00
comment explaining seatedrot deceleration section, and transition-> turn works
This commit is contained in:
parent
fb289704e2
commit
d9065affad
2 changed files with 9 additions and 0 deletions
|
@ -938,6 +938,10 @@
|
|||
"state": "seatedTurnLeft",
|
||||
"var": "isSeatedTurningLeft"
|
||||
},
|
||||
{
|
||||
"state": "seatedTurnRight",
|
||||
"var": "isSeatedTurningRight"
|
||||
},
|
||||
{
|
||||
"state": "masterSeatedIdleRand",
|
||||
"var": "seatedTurnRight_to_IdleOnDone"
|
||||
|
@ -955,6 +959,10 @@
|
|||
"state": "seatedTurnRight",
|
||||
"var": "isSeatedTurningRight"
|
||||
},
|
||||
{
|
||||
"state": "seatedTurnLeft",
|
||||
"var": "isSeatedTurningLeft"
|
||||
},
|
||||
{
|
||||
"state": "masterSeatedIdleRand",
|
||||
"var": "seatedTurnLeft_to_IdleOnDone"
|
||||
|
|
|
@ -3537,6 +3537,7 @@ void MyAvatar::updateOrientation(float deltaTime) {
|
|||
setWorldOrientation(getWorldOrientation() * glm::quat(glm::radians(glm::vec3(0.0f, _seatedBodyYawDelta, 0.0f))));
|
||||
|
||||
} else if (_seatedBodyYawDelta != 0.0f) {
|
||||
//decelerate from seated rotation
|
||||
const float ROTATION_DECAY_TIMESCALE = 0.25f;
|
||||
float attenuation = 1.0f - deltaTime / ROTATION_DECAY_TIMESCALE;
|
||||
if (attenuation < 0.0f) {
|
||||
|
|
Loading…
Reference in a new issue