mirror of
https://github.com/SlimeVR/SlimeVR-Server.git
synced 2026-11-26 03:46:28 -08:00
Fix getting previous rotations (#180)
This commit is contained in:
1 parent
57f3624ee7
commit
39c3285a0a
1 file changed
+2
-2
@@ -102,7 +102,7 @@ public class IMUTracker implements Tracker, TrackerWithTPS, TrackerWithBattery {
|
||||
movementFilterTickCount = ticks;
|
||||
break;
|
||||
case "EXTRAPOLATION":
|
||||
movementFilterAmount = 1f + (amount * 1.1f);
|
||||
movementFilterAmount = 1f + (amount * 1.15f);
|
||||
movementFilterTickCount = ticks;
|
||||
break;
|
||||
case "NONE":
|
||||
@@ -194,10 +194,10 @@ public class IMUTracker implements Tracker, TrackerWithTPS, TrackerWithBattery {
|
||||
timer.update();
|
||||
|
||||
if (movementFilterTickCount != 0) {
|
||||
previousRots.add(rotQuaternion.clone());
|
||||
if (previousRots.size() > movementFilterTickCount) {
|
||||
previousRots.remove(0);
|
||||
}
|
||||
previousRots.add(rotQuaternion.clone());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user