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: linux views when using modified playspace #2017

Merged
merged 4 commits into from
Mar 10, 2024
Merged

Conversation

galister
Copy link
Collaborator

@galister galister commented Mar 4, 2024

Closes #2013

What was changed:

  • mat3x3 multiplication in OnPoseUpdated was wrong
    • replaced with vrmath::matMul33
    • this alone fixed playspace rotation but only while using standing universe
  • do not throw away queued poses when playspace changes
    • with the old logic, there would be ~1s drunken period
    • transition is smooth after the change
  • switch to VRApplication_Background
    • this is to get access to GetTrackingSpace() which tells us if the universe is seated or standing
  • pull seated or standing transform based on current universe
  • handle more events that can cause the playspace to shift
    • previously, it would only trigger on universe change (standing <> seated)
  • InitOpenvrClient and ShutdownOpenvrClient are now state-aware
  • An automatic recovery mechanism was added that triggers if the reported game_render time goes above 250ms.

Thanks to @Vixea for gathering info & testing

@galister galister requested review from zmerp and Vixea March 4, 2024 16:37
@galister
Copy link
Collaborator Author

galister commented Mar 4, 2024

Another thing we could add as a safety net is to force a poseHistory->SetTransform(GetRawZeroPose()); when there have been too many consecutive pose history misses, but I haven't run into a case that the current solution didnt't handle.

@Meister1593
Copy link
Collaborator

does this fix issue with slimevr, some games like space engine, recenter in steamvr changing playerspace and breaking view completely?

@galister
Copy link
Collaborator Author

galister commented Mar 4, 2024

the game i tested was subnautica + vr mod, which had a bad case of triggering the issue on the title screen even. recenter and playspace rotate are also fixed. i would think slimevr as well, though i only tested with vive trackers. feel free to test and let me know.

@galister galister requested a review from Meister1593 March 4, 2024 17:46
@galister
Copy link
Collaborator Author

galister commented Mar 4, 2024

note that wlx-s will also need to be updated to support rotated playspaces for space drag, you may get weird results with it as of now

Copy link
Member

@zmerp zmerp left a comment

Choose a reason for hiding this comment

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

No concerns style-wise. I haven't tested myself

@Okabintaro
Copy link
Contributor

I can confirm this fixed the issues I had on Subnautica with the SubmersedVR Mod. It's perfeclty playable with ALVR on linux now.

@galister galister changed the title fix: linux pose history while using rotated playspace fix: linux views when using modified playspace Mar 10, 2024
@galister galister merged commit a4e6355 into master Mar 10, 2024
7 checks passed
@galister galister deleted the linux-pose-history-fix branch March 10, 2024 12:11
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.

Linux: Rotated playspace breaks ALVR
4 participants