mirror of
https://github.com/overte-org/overte.git
synced 2025-08-06 04:59:54 +02:00
Merge pull request #1234 from ey6es/master
Don't decay head roll/pitch when moving if Faceshift is active. This should fix https://basecamp.com/2151194/projects/2058851-avatar/todos/69596930-avatar-body-still.
This commit is contained in:
commit
e47abf2f4c
1 changed files with 22 additions and 20 deletions
|
@ -269,6 +269,7 @@ void MyAvatar::simulate(float deltaTime, Transmitter* transmitter) {
|
|||
const float OCULUS_ACCELERATION_PULL_THRESHOLD = 1.0f;
|
||||
const int OCULUS_YAW_OFFSET_THRESHOLD = 10;
|
||||
|
||||
if (!Application::getInstance()->getFaceshift()->isActive()) {
|
||||
// Decay HeadPitch as a function of acceleration, so that you look straight ahead when
|
||||
// you start moving, but don't do this with an HMD like the Oculus.
|
||||
if (!OculusManager::isConnected()) {
|
||||
|
@ -291,6 +292,7 @@ void MyAvatar::simulate(float deltaTime, Transmitter* transmitter) {
|
|||
// correct the oculus yaw offset
|
||||
OculusManager::updateYawOffset();
|
||||
}
|
||||
}
|
||||
|
||||
//apply the head lean values to the ball positions...
|
||||
if (USING_HEAD_LEAN) {
|
||||
|
|
Loading…
Reference in a new issue