UDPPacket23RotationAndAcceleration: Switch x and y around to adjust for different axes (#1007)

This commit is contained in:
Ilia Ki authored and GitHub committed 2024-04-27 11:46:17 -03:00
1 parent 24f2895238
commit 8c0c3d1053
1 file changed
+2 -1
@@ -322,7 +322,8 @@ class TrackersUDPServer(private val port: Int, name: String, private val tracker
if (tracker == null) return
tracker.setRotation(rot)
if (packet is UDPPacket23RotationAndAcceleration) {
tracker.setAcceleration(packet.acceleration)
// Switch x and y around to adjust for different axes
tracker.setAcceleration(Vector3(packet.acceleration.y, packet.acceleration.x, packet.acceleration.z))
}
tracker.dataTick()
}