mirror of
https://github.com/overte-org/overte.git
synced 2025-08-06 19:59:28 +02:00
Magic number removal...
This commit is contained in:
parent
e252d3b2ac
commit
3eb0a1a190
1 changed files with 2 additions and 1 deletions
|
@ -310,8 +310,9 @@ void MyAvatar::simulate(float deltaTime, Transmitter* transmitter, float gyroCam
|
||||||
_head.simulate(deltaTime, true, gyroCameraSensitivity);
|
_head.simulate(deltaTime, true, gyroCameraSensitivity);
|
||||||
_hand.simulate(deltaTime, true);
|
_hand.simulate(deltaTime, true);
|
||||||
|
|
||||||
|
const float WALKING_SPEED_THRESHOLD = 0.2f;
|
||||||
// use speed and angular velocity to determine walking vs. standing
|
// use speed and angular velocity to determine walking vs. standing
|
||||||
if (_speed + fabs(_bodyYawDelta) > 0.2) {
|
if (_speed + fabs(_bodyYawDelta) > WALKING_SPEED_THRESHOLD) {
|
||||||
_mode = AVATAR_MODE_WALKING;
|
_mode = AVATAR_MODE_WALKING;
|
||||||
} else {
|
} else {
|
||||||
_mode = AVATAR_MODE_INTERACTING;
|
_mode = AVATAR_MODE_INTERACTING;
|
||||||
|
|
Loading…
Reference in a new issue