mirror of
https://github.com/SlimeVR/SlimeVR-Server.git
synced 2026-04-06 02:01:58 +02:00
Scale arms on proportions reset (#1383)
This commit is contained in:
@@ -56,6 +56,18 @@ class BodyProportionError : IAutoBoneError {
|
||||
SkeletonConfigOffsets.NECK,
|
||||
0.002f,
|
||||
),
|
||||
makeLimiter(
|
||||
SkeletonConfigOffsets.SHOULDERS_WIDTH,
|
||||
0.04f,
|
||||
),
|
||||
makeLimiter(
|
||||
SkeletonConfigOffsets.UPPER_ARM,
|
||||
0.02f,
|
||||
),
|
||||
makeLimiter(
|
||||
SkeletonConfigOffsets.LOWER_ARM,
|
||||
0.02f,
|
||||
),
|
||||
makeLimiter(
|
||||
SkeletonConfigOffsets.UPPER_CHEST,
|
||||
0.01f,
|
||||
|
||||
@@ -452,7 +452,15 @@ class SkeletonConfigManager(
|
||||
|
||||
fun resetOffset(config: SkeletonConfigOffsets) {
|
||||
when (config) {
|
||||
SkeletonConfigOffsets.UPPER_CHEST, SkeletonConfigOffsets.CHEST, SkeletonConfigOffsets.WAIST, SkeletonConfigOffsets.HIP, SkeletonConfigOffsets.UPPER_LEG, SkeletonConfigOffsets.LOWER_LEG -> {
|
||||
SkeletonConfigOffsets.UPPER_ARM,
|
||||
SkeletonConfigOffsets.LOWER_ARM,
|
||||
SkeletonConfigOffsets.UPPER_CHEST,
|
||||
SkeletonConfigOffsets.CHEST,
|
||||
SkeletonConfigOffsets.WAIST,
|
||||
SkeletonConfigOffsets.HIP,
|
||||
SkeletonConfigOffsets.UPPER_LEG,
|
||||
SkeletonConfigOffsets.LOWER_LEG,
|
||||
-> {
|
||||
val height = humanPoseManager?.server?.configManager?.vrConfig?.skeleton?.userHeight ?: -1f
|
||||
if (height > AutoBone.MIN_HEIGHT) { // Reset only if floor level seems right,
|
||||
val proportionLimiter = proportionLimitMap[config]
|
||||
|
||||
Reference in New Issue
Block a user