Vive Ultimate Tracker support

Co-authored-by: Awzri <awzri@awzricat.com>
This commit is contained in:
Sapphire
2025-06-16 19:42:36 +02:00
committed by xytovl
co-authored by Awzri
parent f2050fbe54
commit ad136eae43
13 changed files with 340 additions and 3 deletions
+4 -2
View File
@@ -741,7 +741,7 @@ void scenes::lobby::gui_settings()
}
{
ImGui::BeginDisabled(not(application::get_fb_body_tracking_supported() or application::get_pico_body_tracking_supported()));
ImGui::BeginDisabled(not(application::get_fb_body_tracking_supported() or application::get_htc_body_tracking_supported() or application::get_pico_body_tracking_supported()));
bool enabled = config.check_feature(feature::body_tracking);
if (ImGui::Checkbox(_S("Enable body tracking"), &enabled))
{
@@ -759,6 +759,8 @@ void scenes::lobby::gui_settings()
{
if (application::get_fb_body_tracking_supported())
tooltip(_("Requires 'Hand and body tracking' to be enabled in the Quest movement tracking settings,\notherwise body data will be guessed from controller and headset positions"));
else if (application::get_htc_body_tracking_supported())
tooltip(_("Forwards positions of Vive Ultimate Trackers"));
else if (application::get_pico_body_tracking_supported())
tooltip(_("Uses the Pico Motion Trackers to track body joint positions"));
}
@@ -1482,7 +1484,7 @@ void scenes::lobby::draw_features_status(XrTime predicted_display_time)
});
}
if (application::get_fb_body_tracking_supported() or application::get_pico_body_tracking_supported())
if (application::get_fb_body_tracking_supported() or application::get_htc_body_tracking_supported() or application::get_pico_body_tracking_supported())
{
items.push_back({
.f = feature::body_tracking,
+4
View File
@@ -18,6 +18,8 @@
*/
#include "utils/overloaded.h"
#include "xr/fb_body_tracker.h"
#include "xr/htc_body_tracker.h"
#include "xr/pico_body_tracker.h"
#define GLM_FORCE_RADIANS
#include "stream.h"
@@ -230,6 +232,8 @@ std::shared_ptr<scenes::stream> scenes::stream::create(std::unique_ptr<wivrn_ses
{
if (application::get_fb_body_tracking_supported())
info.num_generic_trackers = xr::fb_body_tracker::get_whitelisted_joints(config.fb_lower_body, config.fb_hip).size();
else if (application::get_htc_body_tracking_supported())
info.num_generic_trackers = application::get_htc_body_tracker().count();
else if (application::get_pico_body_tracking_supported())
info.num_generic_trackers = xr::pico_body_tracker::joint_whitelist.size();
}
+6
View File
@@ -264,6 +264,7 @@ void scenes::stream::tracking()
{
body_none,
body_fb,
body_htc,
body_pico,
} body_tracking = body_none;
@@ -278,6 +279,8 @@ void scenes::stream::tracking()
application::get_fb_body_tracker().stop();
application::get_fb_body_tracker().start(config.fb_lower_body, config.fb_hip);
}
else if (application::get_htc_body_tracking_supported())
body_tracking = body_htc;
else if (application::get_pico_body_tracking_supported())
body_tracking = body_pico;
}
@@ -377,6 +380,9 @@ void scenes::stream::tracking()
case body_fb:
body_packet.poses = application::get_fb_body_tracker().locate_spaces(t0 + Δt, world_space);
break;
case body_htc:
body_packet.poses = application::get_htc_body_tracker().locate_spaces(t0 + Δt, world_space);
break;
case body_pico:
body_packet.poses = application::get_pico_body_tracker().locate_spaces(t0 + Δt, world_space);
break;