mirror of
https://github.com/SlimeVR/SlimeVR-Server.git
synced 2026-11-26 11:56:27 -08:00
Fix jitter when position/height change
This commit is contained in:
1 parent
8dbe1e5c21
commit
963bc4ac1b
1 file changed
+8
-4
@@ -387,10 +387,14 @@ function initializePreview(
|
||||
const newHeight = computeHeadYOffset(bones);
|
||||
if (newHeight !== heightOffset) {
|
||||
heightOffset = newHeight;
|
||||
views.forEach((v) => {
|
||||
v.onHeightChange(v, heightOffset);
|
||||
v.controls.target.add(followOffset);
|
||||
});
|
||||
// Only reframe while following; otherwise this fights the user's
|
||||
// manual drag/zoom on every bone update (height jitters constantly).
|
||||
if (followLocked) {
|
||||
views.forEach((v) => {
|
||||
v.onHeightChange(v, heightOffset);
|
||||
v.controls.target.add(followOffset);
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
updateTrackers,
|
||||
|
||||
Reference in new issue
Block a user