mirror of
https://github.com/lubosz/overte.git
synced 2025-04-23 20:34:07 +02:00
Remove static variable from MyAvatar::update (made it a member).
This commit is contained in:
parent
2be87fe7dc
commit
1e54d41f95
2 changed files with 4 additions and 6 deletions
|
@ -676,12 +676,9 @@ void MyAvatar::update(float deltaTime) {
|
|||
}
|
||||
|
||||
// Recenter the body when foot tracking starts or ends.
|
||||
{
|
||||
static bool prevFeetWereTracked = _isBodyPartTracked._feet;
|
||||
if (_isBodyPartTracked._feet != prevFeetWereTracked) {
|
||||
centerBodyInternal(false);
|
||||
prevFeetWereTracked = _isBodyPartTracked._feet;
|
||||
}
|
||||
if (_isBodyPartTracked._feet != _isBodyPartTracked._feetPreviousUpdate) {
|
||||
centerBodyInternal(false);
|
||||
_isBodyPartTracked._feetPreviousUpdate = _isBodyPartTracked._feet;
|
||||
}
|
||||
|
||||
// put the average hand azimuth into sensor space.
|
||||
|
|
|
@ -2733,6 +2733,7 @@ private:
|
|||
// Indicates which parts of the body are under direct control (tracked).
|
||||
struct {
|
||||
bool _feet{ false }; // Left or right foot.
|
||||
bool _feetPreviousUpdate{ false };// Value of _feet on the previous update.
|
||||
bool _hips{ false };
|
||||
bool _leftHand{ false };
|
||||
bool _rightHand{ false };
|
||||
|
|
Loading…
Reference in a new issue