Add hip tracking toggle for fb body tracking

* Only forward hip joint from FB_body_tracking when lower body is enabled

* Fix body tracking tooltips being too wide
This commit is contained in:
Sapphire
2025-06-08 18:07:23 +02:00
committed by xytovl
parent 1d6b444ec6
commit 40f02b9404
7 changed files with 34 additions and 12 deletions
+13 -4
View File
@@ -758,11 +758,9 @@ void scenes::lobby::gui_settings()
else
{
if (application::get_fb_body_tracking_supported())
tooltip(_("Requires 'Hand and body tracking' to be enabled in the Quest movement tracking settings, otherwise estimated joint positions will be used"));
tooltip(_("Requires 'Hand and body tracking' to be enabled in the Quest movement tracking settings,\notherwise estimated joint positions will be used"));
else if (application::get_pico_body_tracking_supported())
{
tooltip(_("Uses the Pico Motion Trackers to track body joint positions"));
}
}
}
@@ -778,7 +776,18 @@ void scenes::lobby::gui_settings()
}
vibrate_on_hover();
if (ImGui::IsItemHovered())
tooltip(_("Estimate lower body joint positions using Generative Legs, requires 'Hand and body tracking' to be enabled in the Quest movement tracking settings"));
tooltip(_("Estimate lower body joint positions using Generative Legs\nRequires 'Hand and body tracking' to be enabled in the Quest movement tracking settings"));
ImGui::BeginDisabled(not config.fb_lower_body);
if (ImGui::Checkbox(_S("Enable hip tracking"), &config.fb_hip))
{
config.save();
}
vibrate_on_hover();
if (ImGui::IsItemHovered())
tooltip(_("Only takes affect with lower body tracking enabled\nMay be desired when using another source of hip tracking"));
ImGui::EndDisabled();
ImGui::Unindent();
ImGui::EndDisabled();
}
+6 -2
View File
@@ -231,8 +231,12 @@ std::shared_ptr<scenes::stream> scenes::stream::create(std::unique_ptr<wivrn_ses
if (application::get_fb_body_tracking_supported())
{
auto num_trackers = config.fb_lower_body
? xr::fb_body_tracker::joint_whitelist.size()
: std::ranges::count_if(xr::fb_body_tracker::joint_whitelist, [](auto & joint) { return joint < XR_FULL_BODY_JOINT_LEFT_UPPER_LEG_META; });
? std::ranges::count_if(xr::fb_body_tracker::joint_whitelist, [&config](auto joint) {
return config.fb_hip || joint != XR_FULL_BODY_JOINT_HIPS_META;
})
: std::ranges::count_if(xr::fb_body_tracker::joint_whitelist, [](auto joint) {
return joint != XR_FULL_BODY_JOINT_HIPS_META && joint < XR_FULL_BODY_JOINT_LEFT_UPPER_LEG_META;
});
info.num_generic_trackers = num_trackers;
}
else if (application::get_pico_body_tracking_supported())
+1 -1
View File
@@ -274,7 +274,7 @@ void scenes::stream::tracking()
body_tracking = body_fb;
// We start the tracker on connection because there are togglable settings.
// TODO handle reconnection?
application::get_fb_body_tracker().start(config.fb_lower_body);
application::get_fb_body_tracker().start(config.fb_lower_body, config.fb_hip);
}
else if (application::get_pico_body_tracking_supported())
body_tracking = body_pico;