Skip to content

Commit

Permalink
feat(server_openvr): Add Quest Pro controller and headset emulation; …
Browse files Browse the repository at this point in the history
…Use VRLink hand tracking icons for the hand tracker controllers; Misc refactoring to reduce prop.rs linecount (#2489)
  • Loading branch information
shinyquagsire23 authored and zmerp committed Jan 15, 2025
1 parent b176fd4 commit 77cef4f
Show file tree
Hide file tree
Showing 4 changed files with 168 additions and 312 deletions.
12 changes: 8 additions & 4 deletions alvr/server_core/src/connection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,14 +73,18 @@ pub fn contruct_openvr_config(session: &SessionConfig) -> OpenvrConfig {
let controllers_enabled = if let Switch::Enabled(config) = settings.headset.controllers {
controller_is_tracker =
matches!(config.emulation_mode, ControllersEmulationMode::ViveTracker);
// These numbers don't mean anything, they're just for triggering SteamVR resets.
// Gaps are included in the numbering to make adding other controllers
// a bit easier though.
_controller_profile = match config.emulation_mode {
ControllersEmulationMode::RiftSTouch => 0,
ControllersEmulationMode::Quest2Touch => 1,
ControllersEmulationMode::Quest3Plus => 2,
ControllersEmulationMode::ValveIndex => 3,
ControllersEmulationMode::ViveWand => 4,
ControllersEmulationMode::ViveTracker => 5,
ControllersEmulationMode::Custom { .. } => 6,
ControllersEmulationMode::QuestPro => 3,
ControllersEmulationMode::ValveIndex => 20,
ControllersEmulationMode::ViveWand => 40,
ControllersEmulationMode::ViveTracker => 41,
ControllersEmulationMode::Custom { .. } => 500,
};
use_separate_hand_trackers = config
.hand_skeleton
Expand Down
3 changes: 2 additions & 1 deletion alvr/server_core/src/input_mapping.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ pub fn registered_button_set(
match &controllers_emulation_mode {
ControllersEmulationMode::RiftSTouch
| ControllersEmulationMode::Quest2Touch
| ControllersEmulationMode::Quest3Plus => CONTROLLER_PROFILE_INFO
| ControllersEmulationMode::Quest3Plus
| ControllersEmulationMode::QuestPro => CONTROLLER_PROFILE_INFO
.get(&QUEST_CONTROLLER_PROFILE_ID)
.unwrap()
.button_set
Expand Down
Loading

0 comments on commit 77cef4f

Please sign in to comment.