Set timeout before enabling drive keys

This commit is contained in:
luiscuenca 2019-07-25 17:40:09 -07:00
parent 8900c4f2cd
commit c1b818cd9b
No known key found for this signature in database
GPG key ID: 2387ECD129A6961D

View file

@ -6247,8 +6247,11 @@ void MyAvatar::endSit(const glm::vec3& position, const glm::quat& rotation) {
setHMDLeanRecenterEnabled(true);
centerBody();
goToLocation(position, true, rotation, false, false);
// Enable movement again
setSitDriveKeysStatus(true);
float TIME_BEFORE_DRIVE_ENABLED_MS = 150.0f;
QTimer::singleShot(TIME_BEFORE_DRIVE_ENABLED_MS, [this]() {
// Enable movement again
setSitDriveKeysStatus(true);
});
}
}