Skip to content

Commit

Permalink
Updates nodeOffset when body proportions change
Browse files Browse the repository at this point in the history
After a user changes the body proportions, when a tracker connects or disconnects, the skeleton reverts back to the original skeleton. This is because nodeOffset is not updated when the user changes the body proportions, and stores the value at startup. When a tracker connects or disconnects, updateNodeOffsetsInSkeleton overwrites the skeleton's node offsets using the original values. This causes the skeleton to revert back to the original skeleton.

Addresses #1298
  • Loading branch information
jabberrock committed Feb 10, 2025
1 parent 2eb4bab commit 9057bf0
Showing 1 changed file with 2 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -156,14 +156,8 @@ class SkeletonConfigManager(
}

protected fun setNodeOffset(nodeOffset: BoneType, x: Float, y: Float, z: Float) {
var offset = nodeOffsets[nodeOffset]

if (offset == null) {
offset = Vector3(x, y, z)
nodeOffsets[nodeOffset] = offset
} else {
offset = Vector3(x, y, z)
}
val offset = Vector3(x, y, z)
nodeOffsets[nodeOffset] = offset

// Updates in skeleton
humanPoseManager?.updateNodeOffset(nodeOffset, offset)
Expand Down

0 comments on commit 9057bf0

Please sign in to comment.