Skip to content

Commit

Permalink
Improve Autobone upperChest and fix VMC upperChest (#754)
Browse files Browse the repository at this point in the history
  • Loading branch information
Erimelowo committed Jul 4, 2023
1 parent 3068fad commit 3defd47
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions server/src/main/java/dev/slimevr/autobone/AutoBone.kt
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ class AutoBone(server: VRServer) {
val heightOffsets = FastList(
arrayOf(
BoneType.NECK,
BoneType.UPPER_CHEST,
BoneType.CHEST,
BoneType.WAIST,
BoneType.HIP,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,14 +69,14 @@ class BodyProportionError : IAutoBoneError {
RangeProportionLimiter(
0.0945f,
{ config: HumanPoseManager -> config.getOffset(SkeletonConfigOffsets.UPPER_CHEST) },
0.02f
0.01f
),
// Chest
// Experimental: 0.0945
RangeProportionLimiter(
0.0945f,
{ config: HumanPoseManager -> config.getOffset(SkeletonConfigOffsets.CHEST) },
0.02f
0.01f
),
// Waist
// Experimental: 0.118
Expand Down
2 changes: 2 additions & 0 deletions server/src/main/java/dev/slimevr/osc/UnityArmature.kt
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ class UnityArmature(localRot: Boolean) {
}

fun updateNodes() {
// Set the upper chest node's rotation to the chest's
upperChestNode.localTransform.rotation = chestNode.localTransform.rotation
// Update the root node
hipNode.update()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public enum BoneType {
HEAD(BodyPart.HEAD),
HEAD_TRACKER(),
NECK(BodyPart.NECK),
UPPER_CHEST(BodyPart.CHEST),
UPPER_CHEST(BodyPart.UPPER_CHEST),
CHEST_TRACKER,
CHEST(BodyPart.CHEST),
WAIST(BodyPart.WAIST),
Expand Down

0 comments on commit 3defd47

Please sign in to comment.