mirror of
https://github.com/SlimeVR/SlimeVR-Server.git
synced 2026-11-20 00:51:20 -08:00
upper arms are longer than forearms
This commit is contained in:
1 parent
46b48055d0
commit
33833db61b
2 files changed
+13
-10
No files matched your search
@@ -121,8 +121,8 @@ val BONE_SPECS: Map<SkeletonBone, BoneSpec> = mapOf(
|
||||
SkeletonBone.FOOT_SHIFT to BoneSpec(default = -0.05f, min = -0.5f, max = 0.5f, curve = LINEAR_WITH_HEIGHT),
|
||||
SkeletonBone.SHOULDERS_DISTANCE to BoneSpec(default = 0.06f, min = 0.01f, max = 0.3f, curve = LINEAR_WITH_HEIGHT),
|
||||
SkeletonBone.SHOULDERS_WIDTH to BoneSpec(default = 0.35f, min = 0.01f, max = 0.8f, curve = SHOULDERS_WIDTH_BY_STATURE),
|
||||
SkeletonBone.UPPER_ARM to BoneSpec(default = 0.26f, min = 0.01f, max = 0.6f, curve = UPPER_ARM_LENGTH_BY_STATURE),
|
||||
SkeletonBone.LOWER_ARM to BoneSpec(default = 0.26f, min = 0.01f, max = 0.6f, curve = LOWER_ARM_LENGTH_BY_STATURE),
|
||||
SkeletonBone.UPPER_ARM to BoneSpec(default = 0.29f, min = 0.01f, max = 0.6f, curve = UPPER_ARM_LENGTH_BY_STATURE),
|
||||
SkeletonBone.LOWER_ARM to BoneSpec(default = 0.27f, min = 0.01f, max = 0.6f, curve = LOWER_ARM_LENGTH_BY_STATURE),
|
||||
SkeletonBone.HAND to BoneSpec(default = 0.073f, min = 0.01f, max = 0.3f, curve = HAND_LENGTH_BY_STATURE),
|
||||
)
|
||||
|
||||
|
||||
@@ -40,22 +40,25 @@ data class Offset(
|
||||
|
||||
private val leftIndexControllerOffset = Offset(
|
||||
Vector3(-0.02f, 0.07f, 0.13f),
|
||||
Quaternion.rotationAroundXAxis(0.4f),
|
||||
Quaternion.rotationAroundZAxis(0.35f),
|
||||
Quaternion.rotationAroundXAxis(0.42f),
|
||||
Quaternion.rotationAroundZAxis(0.28f),
|
||||
)
|
||||
|
||||
// TODO rotation offset needs to be double checked
|
||||
private val leftPicoControllerOffset = Offset(
|
||||
Vector3(0.01f, 0.11f, 0.11f),
|
||||
Quaternion.rotationAroundXAxis(0.4f),
|
||||
Quaternion.rotationAroundZAxis(0.1f),
|
||||
Quaternion.rotationAroundXAxis(0.42f),
|
||||
Quaternion.rotationAroundZAxis(0.15f),
|
||||
)
|
||||
|
||||
// TODO add more devices, at least Quest controllers
|
||||
// TODO add more devices, at least Quest 2 and 3 controllers
|
||||
private val DISPLAY_NAME_TO_OFFSET = mapOf(
|
||||
// Erimel, through SteamVR
|
||||
"Knuckles Left" to leftIndexControllerOffset,
|
||||
"Knuckles Right" to leftIndexControllerOffset.otherSide,
|
||||
// ZRock, through ?
|
||||
// "Meta Quest 3 (Left Controller)" to
|
||||
// "Meta Quest 3 (Right Controller)" to
|
||||
// Spazzwan, through Steam Link
|
||||
"PICO 4 (Left Controller)" to leftPicoControllerOffset,
|
||||
"PICO 4 (Right Controller)" to leftPicoControllerOffset.otherSide,
|
||||
@@ -67,9 +70,9 @@ private val DISPLAY_NAME_TO_OFFSET = mapOf(
|
||||
// Offset from eyes to centre of head (same for all HMDs).
|
||||
private val hmdOffset = Offset(Vector3(0f, 0f, 0.1f))
|
||||
private val leftGenericControllerOffset = Offset(
|
||||
Vector3(0f, 0.11f, 0.11f),
|
||||
Quaternion.rotationAroundXAxis(0.4f),
|
||||
Quaternion.rotationAroundZAxis(0.1f),
|
||||
Vector3(0f, 0.1f, 0.12f),
|
||||
Quaternion.rotationAroundXAxis(0.42f),
|
||||
Quaternion.rotationAroundZAxis(0.25f),
|
||||
)
|
||||
|
||||
// Used as fallback when map above doesn't contain the entry
|
||||
|
||||
Reference in new issue
Block a user