Also includes speculative PVS-Studio static analysis fix + explanatory comment for VREditorModeManager; followup to CL 23741019.
#jira UE-174475
#preflight 63c859bdd703cf3128ae4930
[CL 23763680 by zach brockway in ue5-main branch]
* Another batch iwyu updates to reduce number of includes used in files
#preflight 63c58d742e714f64ade93797
#rb none
[CL 23732856 by henrik karlsson in ue5-main branch]
- Fix crashes related to interaction profile future remaining unresolved, or being fulfilled at unexpected times (e.g. during editor shutdown).
- Ensure FVREditorModeManager is cleaned up during ShutdownModule, which prevents a crash in TMulticastDelegateBase::RemoveAll.
- Fix shift+V hotkey exit during the period prior to determining the interaction profile, where Virtual Scouting mode is only partially initialized.
#jira UE-167744, UE-168482
#rb jason.walter
#preflight 637edf4b33774509001100bf
#lockdown Alejandro.Arango
[CL 23300617 by zach brockway in ue5-main branch]
This will prevent OpenXR from remapping the actions in a project, but it will fix the pitfalls in the legacy system.
We should strongly encourage that developers do provide a player mappable input config for better OpenXR integration.
#jira UE-147885
#rb Jeff.Fisher
#preflight 630e91e90345de4ccfbfa314
[CL 21712008 by Jules Blok in ue5-main branch]
#preflight 62f8f9d7b66d5d9313536c06
#ROBOMERGE-AUTHOR: rex.hill
#ROBOMERGE-SOURCE: CL 21382837 via CL 21387149 via CL 21390143 via CL 21390737
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v975-21357124)
[CL 21392618 by rex hill in ue5-main branch]
This change also suppresses the "experimental" warning popup if the Virtual Scouting class is selected.
#jira UE-131286
#rb Lauren.Barnes
#preflight 62f67c97b66d5d9313f3a21c
[CL 21357885 by zach brockway in ue5-main branch]
UVREditorInteractor now keeps track of whether action keys are held down in the ActionKeysPressed map, and bIsModifierPressed/bIsTouchingTrackpad/bIsPressingTrackpad have been marked deprecated (and will always remain false).
#jira UE-155707
#rb Lauren.Barnes
#fyi richard.graham
#preflight 62c745ebb3789302b1b5a6cd
[CL 20992906 by zach brockway in ue5-main branch]
This introduced some follow-on issues in places where the grip and aim poses were previously conflated. To address those:
- The Oculus controller mesh (SM_Controller_RiftS) has had a socket named "OpenXrGrip" added to it, calibrated to coincide roughly with the XR Touch v3 model origin. Under OpenXR, if this socket is present, the controller mesh has its relative transform overridden to treat this socket as the origin. While this significantly improves the usability of this legacy mesh, this is not a long-term solution.
- The aforementioned grip socket transform logic occurs in UVREditorInteractor::SetHandMeshComponentProperties, and so in order to enforce it correctly, the VirtualScoutingInteractor blueprint now correctly calls UVREditorInteractor::ReplaceHandMeshComponent, instead of setting the mesh asset directly.
- UVREditorInteractor::ReplaceHandMeshComponent now additionally takes the controller mesh scale as a parameter, in order to correctly account for the Oculus right-hand mirroring (Y scale of -1.0).
- The VRTool_BP blueprint's "Update Transform" method now uses the parent interactor HandMeshComponent transform, rather than UViewportInteractor::GetTransform, in order to keep all the hardcoded offsets correctly pointing to their respective portions of the controller mesh. The "Helper Pivot Rift" scene component is now attached to the parent interactor's HandMeshComponent for the same reason.
-----
This changelist also includes a couple of unrelated small fixes:
- Removes unnecessary ensures from FVirtualScoutingOpenXRExtension::TryGetHmdDeviceType, which could trigger if VR preview was used while the Virtual Scouting plugin is active.
- Changes VRActionTypes::Touch back to a key binding rather than an axis (per the OpenXR spec v1.0.24 ยง6.3.2, "'touch' components are always boolean"), and instead modifies the MarkerTool blueprint to handle it as a key instead of an axis.
#jira UE-157369
#rb Lauren.Barnes, richard.graham
#preflight 62bf2ee8c94105372899cc0a
[CL 20917181 by zach brockway in ue5-main branch]
Fixes several bugs sharing the same root cause, where code/blueprints were attempting to branch on UVREditorMode::GetHMDDeviceType() or UVREditorInteractor::GetHMDDeviceType(). These calls previously returned the result of IXRTrackingSystem::GetSystemName(), and the call sites were only set up to handle "OculusHMD" or "SteamVR," and were now seeing "OpenXR". Instead, we now return one of those legacy plugin names, depending on the current OpenXR hand controller interaction profile. Longer term, we will want to revisit each of these decision points individually, and take into account support for future unknown XR devices.
An alternative subclass of UVREditorMode can now be configured in the editor settings alongside the interactor and teleporter classes, and a new UVirtualScoutingMode subclass splits the mode entry into two phases. This is necessary because OpenXR may not return the correct interaction profile for several frames after the OpenXR session / stereo rendering has started, and we need to defer creation of the interactors, etc.
#jira UE-150037
#rb jason.walter, Lauren.Barnes
#preflight 6287f49a6c7692ac8cd00f29
[CL 20302573 by zach brockway in ue5-main branch]
This migrates the mostly declarative action mappings in UVREditorInteractor::Init_Implementation into a new GetKnownActionMappings method, which we can poll in order to translate them into an OpenXR action set at the point during early initialization which OpenXR requires them to be registered. This also adds a `bIsAxis` flag to FViewportActionKeyInput, because axis mappings need to be handled differently.
The glue code leveraging this is introduced in a new VirtualScouting plugin, where we'll ultimately migrate the existing code as well (away from VirtualProductionUtilities).
#jira UE-146105
#rb Lauren.Barnes
#preflight 6261d5b00a1b9c4e192825ce
[CL 19857480 by zach brockway in ue5-main branch]