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(server_openvr): 🐛 Make SteamVR chaperone consistent with ALVR #2493

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

zmerp
Copy link
Member

@zmerp zmerp commented Nov 5, 2024

Often times, recentering using SteamVR, breaks ALVR calibration. With this PR we force SteamVR to revert to stage tracking any time it gets reset as standing or seated.

Not tested yet. The code that listens for recentering could cause an infinite loop.

Comment on lines 225 to 232
#ifdef __linux__
else if (event.eventType == vr::VREvent_ChaperoneUniverseHasChanged
|| event.eventType == vr::VREvent_ChaperoneRoomSetupFinished
|| event.eventType == vr::VREvent_ChaperoneFlushCache
|| event.eventType == vr::VREvent_ChaperoneSettingsHaveChanged
|| event.eventType == vr::VREvent_SeatedZeroPoseReset
|| event.eventType == vr::VREvent_StandingZeroPoseReset
|| event.eventType == vr::VREvent_SceneApplicationChanged
|| event.eventType == VendorEvent_ALVRDriverResync) {
if (hmd && hmd->m_poseHistory) {
auto rawZeroPose = GetRawZeroPose();
if (rawZeroPose != nullptr) {
hmd->m_poseHistory->SetTransform(*rawZeroPose);
}
}
}
#endif
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This code might not be needed anymore for linux

@zmerp
Copy link
Member Author

zmerp commented Nov 11, 2024

@The-personified-devil I wanted to discuss this. Do you think it's ok to override the game preference and re-reset the chaperone mode to stage when the game actually requested to reset to standing or seated? The benefit of forcing reset to stage is that we can remove the linux zero pose workaround. But this will cause glitches, for example when a game wants to reset to seated, then ALVR would undo it and you get teleported up. instead maybe we should keep track of which chaperone mode it's set to, and when pressing recentering we ask to zero pose with the current SteamVR chaperone mode

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant