mirror of
https://github.com/SlimeVR/SlimeVR-Server.git
synced 2026-04-06 02:01:58 +02:00
Limit prediction slerp amount (#1388)
This commit is contained in:
@@ -64,7 +64,7 @@ class QuaternionMovingAverage(
|
||||
rotBuffer?.forEach { quatBuf *= it }
|
||||
|
||||
// Calculate how much to slerp
|
||||
val amt = predictFactor * fpsTimer.timePerFrame
|
||||
val amt = (predictFactor * fpsTimer.timePerFrame).coerceAtMost(1f)
|
||||
|
||||
// Slerps the target rotation to that predicted rotation by amt
|
||||
filteredQuaternion = filteredQuaternion.interpR(quatBuf, amt)
|
||||
|
||||
Reference in New Issue
Block a user