Revert "Merge pull request #9150 from hyperlogic/bug-fix/driving-while-flying-in-hmd"

This reverts commit a69d77ffbe, reversing
changes made to 996d3f5875.
This commit is contained in:
Anthony J. Thibault 2016-12-05 15:17:32 -08:00
parent e8b5b56df7
commit 49ce04e214
2 changed files with 2 additions and 7 deletions

View file

@ -467,8 +467,6 @@ void MyAvatar::simulate(float deltaTime) {
if (_characterController.getState() != CharacterController::State::Hover) {
updateSensorToWorldMatrix(_enableVerticalComfortMode ? SensorToWorldUpdateMode::VerticalComfort : SensorToWorldUpdateMode::Vertical);
} else {
updateSensorToWorldMatrix(SensorToWorldUpdateMode::None);
}
{
@ -618,8 +616,6 @@ void MyAvatar::updateSensorToWorldMatrix(SensorToWorldUpdateMode mode) {
} else if (mode == SensorToWorldUpdateMode::Vertical) {
setSensorToWorldMatrix(sensorToWorldMat);
}
} else if (mode == SensorToWorldUpdateMode::None) {
setSensorToWorldMatrix(_sensorToWorldMatrix);
}
}
@ -1901,7 +1897,7 @@ void MyAvatar::applyVelocityToSensorToWorldMatrix(const glm::vec3& velocity, flo
// update the position column of matrix
glm::mat4 newSensorToWorldMatrix = _sensorToWorldMatrix;
newSensorToWorldMatrix[3] = glm::vec4(position, 1.0f);
_sensorToWorldMatrix = newSensorToWorldMatrix;
setSensorToWorldMatrix(newSensorToWorldMatrix);
}
}

View file

@ -192,8 +192,7 @@ public:
enum class SensorToWorldUpdateMode {
Full = 0,
Vertical,
VerticalComfort,
None
VerticalComfort
};
void updateSensorToWorldMatrix(SensorToWorldUpdateMode mode = SensorToWorldUpdateMode::Full);