only twist own body, remove unused head functions

This commit is contained in:
Philip Rosedale 2014-12-30 17:02:53 -08:00
parent 98cbb2355f
commit dc9937e11a
3 changed files with 6 additions and 23 deletions

View file

@ -89,12 +89,13 @@ void Head::simulate(float deltaTime, bool isMine, bool billboard) {
_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
const float AUDIO_AVERAGING_SECS = 0.05f;
const float AUDIO_LONG_TERM_AVERAGING_SECS = 30.0f;

View file

@ -73,16 +73,3 @@ void HeadData::setBlendshape(QString name, float 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);
}

View file

@ -65,11 +65,6 @@ public:
float getPupilDilation() const { return _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; }
void setLookAtPosition(const glm::vec3& lookAtPosition) { _lookAtPosition = lookAtPosition; }