Commit Graph

17 Commits

Author SHA1 Message Date
zach brockway
fc5beb7415 Virtual Scouting: When Virtual Scouting exits early due to PropagateAlpha cvar, add a toast/notification to make it more obvious to the user what's happening, and fix a regression that causes a crash.
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]
2023-01-18 16:04:08 -05:00
henrik karlsson
bbc37aa2f5 [Engine/Plugins]
* 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]
2023-01-16 17:04:48 -05:00
dominik peacock
1db84d2ed9 VirtualScoutingEditor should not allow Mac because its build dependency OpenXRHMD does not support Mac
#jira UE-172769
#rb Jason.Walter
#lockdown Alejandro.Arango
#preflight 6399eda42960b7322070bb19

[CL 23534661 by dominik peacock in ue5-main branch]
2022-12-15 19:24:17 -05:00
zach brockway
404ef43732 Virtual Scouting: Delayed initialization fixes.
- 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]
2022-11-28 19:29:16 -05:00
Robb Surridge
610c467639 Update vendor links for built-in plugins to use secure protocol.
#jira UE-166823
#rb lauren.barnes
#preflight 6352b20b7261e565c476ec3b

[CL 22690089 by Robb Surridge in ue5-main branch]
2022-10-21 11:04:07 -04:00
zach brockway
ab5534c699 Virtual Scouting: Rename current mode class from UVirtualScoutingMode to UVPScoutingMode, to reflect its dependence on the Virtual Production Utilities plugin.
#rnx
#jira UE-167400
#rb jason.walter
#preflight 634de3d8820aa0c19306c9a5
#lockdown alejandro.arango

[CL 22634651 by zach brockway in ue5-main branch]
2022-10-19 15:09:43 -04:00
Jules Blok
2ac95d6d97 Create actions for each individual key when not using a player mappable input config.
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]
2022-08-30 19:02:02 -04:00
rex hill
421ff22fb1 Fix several check() that should be verify() must still run in shipping
#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]
2022-08-15 15:52:39 -04:00
zach brockway
40d83bdbcd Virtual Scouting: Log an error and refuse to launch if r.PostProcessing.PropagateAlpha is not set to 0.
#jira UE-151846
#rb jason.walter
#preflight 62f690ab23003b62a3ab0e19

[CL 21359011 by zach brockway in ue5-main branch]
2022-08-12 14:05:16 -04:00
zach brockway
44263ab7d5 Virtual Scouting / VR Editor: Rather than specifying interactor or teleporter class overrides directly in editor preferences, these are now determined by choosing a VREditorMode subclass. This change lays the groundwork for further simplification of first-time setup / onboarding.
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]
2022-08-12 13:05:45 -04:00
zach brockway
24ecd5c0f0 Virtual Scouting: When the OpenXR XR_EXT_dpad_binding extension is missing, synthesize Trackpad(Up|Down|Left|Right) events based on axis inputs instead. This is currently required for feature parity under the Oculus OpenXR runtime.
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]
2022-07-07 17:11:33 -04:00
zach brockway
5ab267fd33 Virtual Scouting: Use OpenXR aim pose for laser origin when available. Adds a second motion controller component to the interactor, with its motion source set to "(Left|Right)Aim" when supported, and uses that to drive FViewportInteractorData::Transform, rather than the grip pose.
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]
2022-07-01 13:49:32 -04:00
zach brockway
1e485dfbaf Virtual Scouting: Non-unity build fix.
#jira UE-153525
#rb trivial
#preflight 628bb17ef1421422ea7365b0

[CL 20330548 by zach brockway in ue5-main branch]
2022-05-23 12:33:59 -04:00
zach brockway
8c306be3fb Virtual Scouting: GetHMDDeviceType backward compatibility under OpenXR.
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]
2022-05-20 16:40:40 -04:00
zach brockway
cd7ea60aa5 VirtualScouting / OpenXRInput: UnrealGame NoPCH build fixes
#jira UE-149952, UE-149959
#preflight 6262e111d929bc34a32f6fa3

[CL 19867613 by zach brockway in ue5-main branch]
2022-04-22 13:23:20 -04:00
zach brockway
42da401799 Virtual Scouting: Static analysis fix.
#preflight 6261eb920a1b9c4e192c510a

[CL 19859128 by zach brockway in ue5-main branch]
2022-04-21 19:56:24 -04:00
zach brockway
3a3ce4869b Virtual Scouting: Changes required for compatibility with OpenXR.
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]
2022-04-21 18:49:47 -04:00