added the fixes for the lurch that happens when driving or flying

This commit is contained in:
amantley 2018-06-21 11:22:26 -07:00
parent aa630e02cf
commit e4ca6c6303
2 changed files with 2 additions and 2 deletions

View file

@ -3318,7 +3318,7 @@ void MyAvatar::FollowHelper::prePhysicsUpdate(MyAvatar& myAvatar, const glm::mat
if (!isActive(Rotation) && (shouldActivateRotation(myAvatar, desiredBodyMatrix, currentBodyMatrix) || hasDriveInput)) {
activate(Rotation);
}
if (!isActive(Horizontal) && shouldActivateHorizontal(myAvatar, desiredBodyMatrix, currentBodyMatrix)) {
if (!isActive(Horizontal) && (shouldActivateHorizontal(myAvatar, desiredBodyMatrix, currentBodyMatrix) || hasDriveInput)) {
activate(Horizontal);
}
if (!isActive(Vertical) && (shouldActivateVertical(myAvatar, desiredBodyMatrix, currentBodyMatrix) || hasDriveInput)) {

View file

@ -46,7 +46,7 @@ static AnimPose computeHipsInSensorFrame(MyAvatar* myAvatar, bool isFlying) {
}
glm::mat4 hipsMat;
if (myAvatar->getCenterOfGravityModelEnabled()) {
if (myAvatar->getCenterOfGravityModelEnabled() && !isFlying) {
// then we use center of gravity model
hipsMat = myAvatar->deriveBodyUsingCgModel();
} else {