Skip to content

Commit 13472e7

Browse files
committed
[TEMP] Add a hack to enable this from the latest mediapose-vr release
Setting a -ve "additional smoothing" will enable the velocity based tracking and >1 will disable it again, and this will persist until you change it to a value outside of [0,1).
1 parent 358f86a commit 13472e7

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

driver_files/src/Driver/TrackerDevice.cpp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,16 +37,19 @@ void ExampleDriver::TrackerDevice::reinit(int msaved, double mtime, double msmoo
3737
if (msaved < 5) //prevent having too few values to calculate linear interpolation, and prevent crash on 0
3838
msaved = 5;
3939

40-
if (msmooth < 0)
40+
if (msmooth < 0) {
4141
msmooth = 0;
42-
else if (msmooth > 0.99)
42+
use_velocity = true;
43+
} else if (msmooth > 0.99) {
4344
msmooth = 0.99;
45+
use_velocity = false;
46+
}
4447

4548
prev_positions.clear();
4649
prev_positions.resize(msaved);
4750
max_time = mtime;
4851
smoothing = msmooth;
49-
use_velocity = velocity;
52+
//use_velocity = velocity;
5053

5154
Log("Settings changed! " + std::to_string(msaved) + ' ' + std::to_string(mtime) + ' ' + std::to_string(msmooth) + ' ' + std::to_string(velocity));
5255
}

0 commit comments

Comments
 (0)