mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 12:17:45 +02:00
Fix avatar rotation rate depending on FPS
This commit is contained in:
parent
eecb5b91b2
commit
f5d66bbf2e
2 changed files with 2 additions and 2 deletions
|
@ -2841,7 +2841,7 @@ void Application::update(float deltaTime) {
|
||||||
const float EXPECTED_FRAME_RATE = 60.0f;
|
const float EXPECTED_FRAME_RATE = 60.0f;
|
||||||
float timeFactor = EXPECTED_FRAME_RATE * deltaTime;
|
float timeFactor = EXPECTED_FRAME_RATE * deltaTime;
|
||||||
myAvatar->setDriveKeys(PITCH, -1.0f * userInputMapper->getActionState(controller::Action::PITCH) / timeFactor);
|
myAvatar->setDriveKeys(PITCH, -1.0f * userInputMapper->getActionState(controller::Action::PITCH) / timeFactor);
|
||||||
myAvatar->setDriveKeys(YAW, -1.0f * userInputMapper->getActionState(controller::Action::YAW) / timeFactor);
|
myAvatar->setDriveKeys(YAW, -1.0f * userInputMapper->getActionState(controller::Action::YAW));
|
||||||
myAvatar->setDriveKeys(STEP_YAW, -1.0f * userInputMapper->getActionState(controller::Action::STEP_YAW));
|
myAvatar->setDriveKeys(STEP_YAW, -1.0f * userInputMapper->getActionState(controller::Action::STEP_YAW));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -173,7 +173,7 @@ protected:
|
||||||
QVector<Model*> _attachmentModels;
|
QVector<Model*> _attachmentModels;
|
||||||
QVector<Model*> _attachmentsToRemove;
|
QVector<Model*> _attachmentsToRemove;
|
||||||
QVector<Model*> _unusedAttachments;
|
QVector<Model*> _unusedAttachments;
|
||||||
float _bodyYawDelta;
|
float _bodyYawDelta; // degrees/sec
|
||||||
|
|
||||||
// These position histories and derivatives are in the world-frame.
|
// These position histories and derivatives are in the world-frame.
|
||||||
// The derivatives are the MEASURED results of all external and internal forces
|
// The derivatives are the MEASURED results of all external and internal forces
|
||||||
|
|
Loading…
Reference in a new issue