mirror of
https://github.com/overte-org/overte.git
synced 2025-08-07 18:10:37 +02:00
only twist own body, remove unused head functions
This commit is contained in:
parent
98cbb2355f
commit
dc9937e11a
3 changed files with 6 additions and 23 deletions
|
@ -89,12 +89,13 @@ void Head::simulate(float deltaTime, bool isMine, bool billboard) {
|
||||||
_blendshapeCoefficients = faceTracker->getBlendshapeCoefficients();
|
_blendshapeCoefficients = faceTracker->getBlendshapeCoefficients();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// Twist the upper body to follow the rotation of the head, but only do this with my avatar,
|
||||||
|
// since everyone else will see the full joint rotations for other people.
|
||||||
|
const float BODY_FOLLOW_HEAD_YAW_RATE = 0.1f;
|
||||||
|
const float BODY_FOLLOW_HEAD_FACTOR = 1.5f;
|
||||||
|
setTorsoTwist((1.0f - BODY_FOLLOW_HEAD_YAW_RATE) * getTorsoTwist() + getFinalYaw() * BODY_FOLLOW_HEAD_YAW_RATE / BODY_FOLLOW_HEAD_FACTOR);
|
||||||
}
|
}
|
||||||
// Twist the upper body to follow the rotation of the head
|
|
||||||
const float BODY_FOLLOW_HEAD_YAW_RATE = 0.1f;
|
|
||||||
const float BODY_FOLLOW_HEAD_FACTOR = 1.5f;
|
|
||||||
setTorsoTwist((1.0f - BODY_FOLLOW_HEAD_YAW_RATE) * getTorsoTwist() + getFinalYaw() * BODY_FOLLOW_HEAD_YAW_RATE / BODY_FOLLOW_HEAD_FACTOR);
|
|
||||||
|
|
||||||
// Update audio trailing average for rendering facial animations
|
// Update audio trailing average for rendering facial animations
|
||||||
const float AUDIO_AVERAGING_SECS = 0.05f;
|
const float AUDIO_AVERAGING_SECS = 0.05f;
|
||||||
const float AUDIO_LONG_TERM_AVERAGING_SECS = 30.0f;
|
const float AUDIO_LONG_TERM_AVERAGING_SECS = 30.0f;
|
||||||
|
|
|
@ -73,16 +73,3 @@ void HeadData::setBlendshape(QString name, float val) {
|
||||||
_blendshapeCoefficients[it.value()] = val;
|
_blendshapeCoefficients[it.value()] = val;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void HeadData::addYaw(float yaw) {
|
|
||||||
setBaseYaw(_baseYaw + yaw);
|
|
||||||
}
|
|
||||||
|
|
||||||
void HeadData::addPitch(float pitch) {
|
|
||||||
setBasePitch(_basePitch + pitch);
|
|
||||||
}
|
|
||||||
|
|
||||||
void HeadData::addRoll(float roll) {
|
|
||||||
setBaseRoll(_baseRoll + roll);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
|
@ -65,11 +65,6 @@ public:
|
||||||
float getPupilDilation() const { return _pupilDilation; }
|
float getPupilDilation() const { return _pupilDilation; }
|
||||||
void setPupilDilation(float pupilDilation) { _pupilDilation = pupilDilation; }
|
void setPupilDilation(float pupilDilation) { _pupilDilation = pupilDilation; }
|
||||||
|
|
||||||
// degrees
|
|
||||||
void addYaw(float yaw);
|
|
||||||
void addPitch(float pitch);
|
|
||||||
void addRoll(float roll);
|
|
||||||
|
|
||||||
const glm::vec3& getLookAtPosition() const { return _lookAtPosition; }
|
const glm::vec3& getLookAtPosition() const { return _lookAtPosition; }
|
||||||
void setLookAtPosition(const glm::vec3& lookAtPosition) { _lookAtPosition = lookAtPosition; }
|
void setLookAtPosition(const glm::vec3& lookAtPosition) { _lookAtPosition = lookAtPosition; }
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue