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

AR, Camera Mode and Scene Scale Fixes #9117

Merged
merged 22 commits into from Oct 28, 2023
Merged

Conversation

HexaField
Copy link
Member

@HexaField HexaField commented Oct 21, 2023

Summary

  • fixes avatar height scaling conflicting with scene scale
  • fixes camera avatar attach state
  • fixes movement controls state
  • hide mobile touchpad when in attached state
  • fixes head decap not reactively responding to camera attach state, which was causing incorrect avatar rotation
  • fixes client input system not handling WebXR input sources and emulated input sources for mobile AR
  • combine userEyeLevel and userAvatarHeightDifference into userAvatarHeightScale
  • implements AR placement and miniature mode with similar controls to non-immersive

🤖 Generated by Copilot at 4aec1a7

This pull request enhances the XR support for the avatar system and the touch gamepad component. It introduces new modules XRControlsState and XRState to handle the scaling and camera modes for XR devices. It also fixes some issues with the avatar IK and movement functions, and imports the AvatarHeadDecapComponent for the avatar animation system.

References

closes #9109
closes #7670

Explanation

🤖 Generated by Copilot at 4aec1a7

  • Add XRControlsState to manage XR movement and camera modes (link, link, link)
  • Use XRState.worldScale to account for user avatar height difference in IK and movement calculations (link, link)
  • Use XRControlsState.isCameraAttachedToAvatar to determine camera mode in IK and movement logic (link, link, link, link)
  • Hide TouchGamepad component if XR movement controls are disabled (link, link)
  • Import AvatarHeadDecapComponent in AvatarAnimationSystem.ts to mark avatars with decapitated heads (link)

🤖 Generated by Copilot at 94d761e

Sing, O Muse, of the glorious deeds of the code warriors,
Who toiled with Hyperflux and hookstates to craft the AR placement UI,
And who scaled and adjusted the scene and the avatar with inverseWorldScale,
As the gods scale Olympus or the Titans scale Othrys in their strife.

QA Steps

List any additional steps required to QA the changes of this PR, as well as any supplemental images or videos.

Checklist

  • If this PR is still a WIP, convert to a draft
  • When this PR is ready, mark it as "Ready for review"
  • ensure all checks pass
  • Changes have been manually QA'd
  • Changes reviewed by at least 2 approved reviewers

@HexaField HexaField marked this pull request as ready for review October 22, 2023 03:58
@HexaField HexaField changed the title AR Camera Mode and Scene Scale Fixes Mobile AR Camera Mode and Scene Scale Fixes Oct 22, 2023
@AidanCaruso
Copy link
Member

Pushed a one liner to fix the head occluding view in webxr

@AidanCaruso
Copy link
Member

When testing in my Quest there still seems to be something preventing the head decap component from working the first time I enter immersive mode. Restarting immersive webxr in the same session it works fine. I cannot reproduce this behavior with the emulator.

@HexaField HexaField changed the title Mobile AR Camera Mode and Scene Scale Fixes AR, Camera Mode and Scene Scale Fixes Oct 26, 2023
@HexaField HexaField merged commit 8ebb6b1 into dev Oct 28, 2023
11 of 13 checks passed
@HexaField HexaField deleted the fix-avatar-disconnect-mobile-ar branch October 28, 2023 22:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug] No locomotion in mobile AR [Bug] Fix AR hit test for headset & mobile - Scene placement
2 participants