mirror of
https://github.com/overte-org/overte.git
synced 2025-08-06 15:59:49 +02:00
hydra dead zone to prevent drifting
This commit is contained in:
parent
1930043329
commit
c1fdbeb3b4
1 changed files with 8 additions and 0 deletions
|
@ -36,6 +36,8 @@ const float NECK_X = 0.25f; // meters
|
||||||
const float NECK_Y = 0.3f; // meters
|
const float NECK_Y = 0.3f; // meters
|
||||||
const float NECK_Z = 0.3f; // meters
|
const float NECK_Z = 0.3f; // meters
|
||||||
|
|
||||||
|
const float CONTROLLER_THRESHOLD = 0.35f;
|
||||||
|
|
||||||
#ifdef __APPLE__
|
#ifdef __APPLE__
|
||||||
typedef int (*SixenseBaseFunction)();
|
typedef int (*SixenseBaseFunction)();
|
||||||
typedef int (*SixenseTakeIntFunction)(int);
|
typedef int (*SixenseTakeIntFunction)(int);
|
||||||
|
@ -326,6 +328,12 @@ void SixenseManager::update(float deltaTime) {
|
||||||
}
|
}
|
||||||
_controllersAtBase = (numControllersAtBase == 2);
|
_controllersAtBase = (numControllersAtBase == 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for (auto axisState : _axisStateMap) {
|
||||||
|
if (fabsf(axisState.second) < CONTROLLER_THRESHOLD) {
|
||||||
|
_axisStateMap[axisState.first] = 0.0f;
|
||||||
|
}
|
||||||
|
}
|
||||||
#endif // HAVE_SIXENSE
|
#endif // HAVE_SIXENSE
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue