mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 18:23:54 +02:00
Approach the webcam position rapidly.
This commit is contained in:
parent
281aee1f12
commit
3de76c9e15
1 changed files with 2 additions and 2 deletions
|
@ -310,8 +310,8 @@ void SerialInterface::readData(float deltaTime) {
|
|||
// Attempt to fuse gyro position with webcam position
|
||||
Webcam* webcam = Application::getInstance()->getWebcam();
|
||||
if (webcam->isActive()) {
|
||||
_estimatedPosition = glm::mix(_estimatedPosition, webcam->getEstimatedPosition(),
|
||||
1.0f / SENSOR_FUSION_SAMPLES);
|
||||
const float WEBCAM_POSITION_FUSION = 0.5f;
|
||||
_estimatedPosition = glm::mix(_estimatedPosition, webcam->getEstimatedPosition(), WEBCAM_POSITION_FUSION);
|
||||
|
||||
} else {
|
||||
_estimatedPosition *= DECAY_POSITION;
|
||||
|
|
Loading…
Reference in a new issue