Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix XR Body crouching and climbing #89103

Merged
merged 2 commits into from
Mar 6, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions scene/3d/xr_body_modifier_3d.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -353,8 +353,9 @@ void XRBodyModifier3D::_update_skeleton() {
const int parent_joint = joints[joint].parent_joint;
const Transform3D relative_transform = inv_transforms[parent_joint] * transforms[joint];

// Update the bone position if enabled by update mode.
if (bone_update == BONE_UPDATE_FULL) {
// Update the bone position if enabled by update mode, or if the joint is the hips to allow
// for climbing or crouching.
if (bone_update == BONE_UPDATE_FULL || joint == XRBodyTracker::JOINT_HIPS) {
skeleton->set_bone_pose_position(joints[joint].bone, relative_transform.origin);
}

Expand Down
Loading