fix bug preventing avatar motion in 2D mode

This commit is contained in:
U-GAPOS\andrew 2015-11-02 11:06:17 -08:00
parent 9799693135
commit a545d770d8

View file

@ -1295,8 +1295,13 @@ void MyAvatar::prepareForPhysicsSimulation() {
relayDriveKeysToCharacterController();
_characterController.setTargetVelocity(getTargetVelocity());
_characterController.setAvatarPositionAndOrientation(getPosition(), getOrientation());
updateHMDFollowVelocity();
_characterController.setHMDVelocity(_hmdFollowVelocity);
if (qApp->isHMDMode()) {
updateHMDFollowVelocity();
_characterController.setHMDVelocity(_hmdFollowVelocity);
} else {
_characterController.setHMDVelocity(Vectors::ZERO);
_isFollowingHMD = false;
}
}
void MyAvatar::harvestResultsFromPhysicsSimulation() {