mirror of
https://github.com/SlimeVR/SlimeVR-Server.git
synced 2026-12-03 23:32:29 -08:00
Stay Aligned
Keeps your trackers aligned by slowly adjusting the yaw of your trackers to correct for drift. Every tick, Stay Aligned adjusts the yaw of one tracker. It looks at the player's current pose, and adjusts the yaw of the tracker by a tiny amount, in the direction which is closest to the relaxed pose that the player set up. Over time, this has the effect of keeping all the trackers in a human-like pose.
This commit is contained in:
1 parent
8881746941
commit
853d112737
49 files changed
+2964
-17
No files matched your search
@@ -180,6 +180,24 @@ class QuaternionTest {
|
||||
assertEquals(v2, v1)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun sandwichUnitX() {
|
||||
val q = Quaternion(0.34f, 0.223f, -0.8f, -0.7f).unit()
|
||||
assertTrue(q.sandwichUnitX().isNear(q.sandwich(Vector3.POS_X)))
|
||||
}
|
||||
|
||||
@Test
|
||||
fun sandwichUnitY() {
|
||||
val q = Quaternion(0.34f, 0.223f, -0.8f, -0.7f).unit()
|
||||
assertTrue(q.sandwichUnitY().isNear(q.sandwich(Vector3.POS_Y)))
|
||||
}
|
||||
|
||||
@Test
|
||||
fun sandwichUnitZ() {
|
||||
val q = Quaternion(0.34f, 0.223f, -0.8f, -0.7f).unit()
|
||||
assertTrue(q.sandwichUnitZ().isNear(q.sandwich(Vector3.POS_Z)))
|
||||
}
|
||||
|
||||
@Test
|
||||
fun axis() {
|
||||
val v1 = Quaternion(0f, Quaternion(1f, 2f, 3f, 4f).axis())
|
||||
|
||||
Reference in new issue
Block a user