mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 18:23:54 +02:00
removed a commment and changed the sanity check to be a const instead of a magic number
This commit is contained in:
parent
952b112271
commit
cf7dc49499
1 changed files with 2 additions and 2 deletions
|
@ -470,8 +470,8 @@ void MyAvatar::updateSitStandState(float newHeightReading, float angleHeadUp) {
|
|||
const int SITTING_COUNT_THRESHOLD = 180;
|
||||
const int STANDING_COUNT_THRESHOLD = 60;
|
||||
const int SQUATTY_COUNT_THRESHOLD = 600;
|
||||
const float SITTING_UPPER_BOUND = 1.52f;
|
||||
|
||||
// qCDebug(interfaceapp) << "locked " << getIsSitStandStateLocked() << " away " << getIsAway() << " hmd " << qApp->isHMDMode() << " user height " << _userHeight.get();
|
||||
if (!getIsSitStandStateLocked() && !getIsAway() && qApp->isHMDMode()) {
|
||||
if (getIsInSittingState()) {
|
||||
if (newHeightReading > (STANDING_HEIGHT_MULTIPLE * _tippingPoint)) {
|
||||
|
@ -494,7 +494,7 @@ void MyAvatar::updateSitStandState(float newHeightReading, float angleHeadUp) {
|
|||
}
|
||||
} else {
|
||||
// sanity check if average height greater than 5ft they are not sitting(or get off your dangerous barstool please)
|
||||
if (_sumUserHeightSensorSpace > 1.52f) {
|
||||
if (_sumUserHeightSensorSpace > SITTING_UPPER_BOUND) {
|
||||
setIsInSittingState(true);
|
||||
} else {
|
||||
// tipping point is average height when sitting.
|
||||
|
|
Loading…
Reference in a new issue