diff --git a/Submodules/Examples b/Submodules/Examples index a00c608ba..317e4d6d3 160000 --- a/Submodules/Examples +++ b/Submodules/Examples @@ -1 +1 @@ -Subproject commit a00c608ba44181a52465175b4521aa4be34fa05c +Subproject commit 317e4d6d3a1268a572ded99ef570e905b967da35 diff --git a/Submodules/Lumin b/Submodules/Lumin index 068bd6e47..389fe7366 160000 --- a/Submodules/Lumin +++ b/Submodules/Lumin @@ -1 +1 @@ -Subproject commit 068bd6e472c6f2b2a9208824551799c88e0a7100 +Subproject commit 389fe736626c25b2de5ed1792543c8dae24d2d86 diff --git a/Submodules/Oculus b/Submodules/Oculus index f75455b4c..2ce212e64 160000 --- a/Submodules/Oculus +++ b/Submodules/Oculus @@ -1 +1 @@ -Subproject commit f75455b4c46c2ff2bb39bc740c7e00462d9c4d59 +Subproject commit 2ce212e647f0110820352fded98af3db0528084a diff --git a/Submodules/Ultraleap b/Submodules/Ultraleap index a43b0dc75..9f07b69d8 160000 --- a/Submodules/Ultraleap +++ b/Submodules/Ultraleap @@ -1 +1 @@ -Subproject commit a43b0dc7577c3d2587045f9913fb0f4c6571d5ee +Subproject commit 9f07b69d8845768084a11cf0a3ee03020d850a8c diff --git a/Submodules/WindowsMixedReality b/Submodules/WindowsMixedReality index 5c5995a79..1b49bc194 160000 --- a/Submodules/WindowsMixedReality +++ b/Submodules/WindowsMixedReality @@ -1 +1 @@ -Subproject commit 5c5995a79daaa2006ba2a2e983cfeecc9ed649e8 +Subproject commit 1b49bc1943b7daf3165a0b9a4972b702960308a0 diff --git a/XRTK-Core/Packages/com.xrtk.core/Editor/Profiles/MixedRealityToolkitRootProfileInspector.cs b/XRTK-Core/Packages/com.xrtk.core/Editor/Profiles/MixedRealityToolkitRootProfileInspector.cs index 0e298c6d8..1af14a641 100644 --- a/XRTK-Core/Packages/com.xrtk.core/Editor/Profiles/MixedRealityToolkitRootProfileInspector.cs +++ b/XRTK-Core/Packages/com.xrtk.core/Editor/Profiles/MixedRealityToolkitRootProfileInspector.cs @@ -110,8 +110,8 @@ protected override void OnEnable() { if (MixedRealityToolkit.TryGetSystem(out var cameraSystem)) { - var playspace = cameraSystem.MainCameraRig.PlayspaceTransform; - Debug.Assert(playspace != null); + var rig = cameraSystem.MainCameraRig.RigTransform; + Debug.Assert(rig != null); } MixedRealityToolkit.Instance.ActiveProfile = rootProfile; diff --git a/XRTK-Core/Packages/com.xrtk.core/Runtime/Definitions/BoundarySystem/InscribedRectangle.cs b/XRTK-Core/Packages/com.xrtk.core/Runtime/Definitions/BoundarySystem/InscribedRectangle.cs index 7241f546c..7084db280 100644 --- a/XRTK-Core/Packages/com.xrtk.core/Runtime/Definitions/BoundarySystem/InscribedRectangle.cs +++ b/XRTK-Core/Packages/com.xrtk.core/Runtime/Definitions/BoundarySystem/InscribedRectangle.cs @@ -188,7 +188,7 @@ public InscribedRectangle(Edge[] geometryEdges, int randomSeed) // Calculate the midpoint between the top and bottom collision points. Vector2 verticalMidpoint = new Vector2((aX + bX) * 0.5f, (aY + bY) * 0.5f); - if (TryFixMaximumRectangle( + if (TryFitMaximumRectangle( geometryEdges, verticalMidpoint, angleRadians, @@ -213,7 +213,7 @@ public InscribedRectangle(Edge[] geometryEdges, int randomSeed) // Calculate the midpoint between the left and right collision points. var horizontalMidpoint = new Vector2((aX + bX) * 0.5f, (aY + bY) * 0.5f); - if (TryFixMaximumRectangle( + if (TryFitMaximumRectangle( geometryEdges, horizontalMidpoint, angleRadians, @@ -426,7 +426,7 @@ private static bool CheckRectangleFit(Edge[] geometryEdges, Vector2 centerPoint, /// True if a rectangle with an area greater than or equal to minArea was able to be fit /// within the geometry at centerPoint. /// - private static bool TryFixMaximumRectangle( + private static bool TryFitMaximumRectangle( Edge[] geometryEdges, Vector2 centerPoint, float angleRadians, @@ -518,4 +518,4 @@ private static bool TryFixMaximumRectangle( return (aspectRatio > 0.0f); } } -} \ No newline at end of file +} diff --git a/XRTK-Core/Packages/com.xrtk.core/Runtime/Definitions/Controllers/Hands/HandData.cs b/XRTK-Core/Packages/com.xrtk.core/Runtime/Definitions/Controllers/Hands/HandData.cs index b4a4baf83..9cb07697b 100644 --- a/XRTK-Core/Packages/com.xrtk.core/Runtime/Definitions/Controllers/Hands/HandData.cs +++ b/XRTK-Core/Packages/com.xrtk.core/Runtime/Definitions/Controllers/Hands/HandData.cs @@ -89,7 +89,7 @@ public HandData(MixedRealityPose rootPose, MixedRealityPose[] jointPoses) public float GripStrength { get; set; } /// - /// The hand's pointer pose, relative to . + /// The hand's pointer pose, relative to . /// public MixedRealityPose PointerPose { get; set; } @@ -102,7 +102,7 @@ public HandData(MixedRealityPose rootPose, MixedRealityPose[] jointPoses) /// /// The hands root pose. poses are relative to the root pose. - /// The root pose itself is relative to . + /// The root pose itself is relative to . /// public MixedRealityPose RootPose { get; set; } diff --git a/XRTK-Core/Packages/com.xrtk.core/Runtime/Definitions/Utilities/TrackedObjectType.cs b/XRTK-Core/Packages/com.xrtk.core/Runtime/Definitions/Utilities/TrackedObjectType.cs index e909f439c..f9a037ae7 100644 --- a/XRTK-Core/Packages/com.xrtk.core/Runtime/Definitions/Utilities/TrackedObjectType.cs +++ b/XRTK-Core/Packages/com.xrtk.core/Runtime/Definitions/Utilities/TrackedObjectType.cs @@ -24,8 +24,8 @@ public enum TrackedObjectType /// Body, /// - /// Calculates position and orientation based on the + /// Calculates position and orientation based on the /// - Playspace, + Rig } -} \ No newline at end of file +} diff --git a/XRTK-Core/Packages/com.xrtk.core/Runtime/Interfaces/IMixedRealityCameraRig.cs b/XRTK-Core/Packages/com.xrtk.core/Runtime/Interfaces/IMixedRealityCameraRig.cs index 657ec7283..abc3b3182 100644 --- a/XRTK-Core/Packages/com.xrtk.core/Runtime/Interfaces/IMixedRealityCameraRig.cs +++ b/XRTK-Core/Packages/com.xrtk.core/Runtime/Interfaces/IMixedRealityCameraRig.cs @@ -7,7 +7,7 @@ namespace XRTK.Interfaces.CameraSystem { /// - /// This interface is to be implemented by a and attached to the playspace root object. + /// This interface is to be implemented by a and attached to the rig root object. /// public interface IMixedRealityCameraRig { @@ -17,11 +17,11 @@ public interface IMixedRealityCameraRig GameObject GameObject { get; } /// - /// The root playspace transform that serves as the root of the camera rig. + /// The root rig transform. /// This transform serves as a virtual representation of the physical space. /// All physical objects that have digital twins will use this frame of reference to synchronize their transform data. /// - Transform PlayspaceTransform { get; } + Transform RigTransform { get; } /// /// The player's head transform where the is located. @@ -47,4 +47,4 @@ public interface IMixedRealityCameraRig /// Transform BodyTransform { get; } } -} \ No newline at end of file +} diff --git a/XRTK-Core/Packages/com.xrtk.core/Runtime/Providers/CameraSystem/BaseCameraDataProvider.cs b/XRTK-Core/Packages/com.xrtk.core/Runtime/Providers/CameraSystem/BaseCameraDataProvider.cs index 41241c589..2d9027860 100644 --- a/XRTK-Core/Packages/com.xrtk.core/Runtime/Providers/CameraSystem/BaseCameraDataProvider.cs +++ b/XRTK-Core/Packages/com.xrtk.core/Runtime/Providers/CameraSystem/BaseCameraDataProvider.cs @@ -148,8 +148,15 @@ public override void Initialize() if (CameraRig == null) { - // TODO Currently we always get the main camera. Should we provide a tag to search for alts? - CameraRig = CameraCache.Main.gameObject.EnsureComponent(cameraRigType) as IMixedRealityCameraRig; + if (CameraCache.Main.transform.parent.IsNull()) + { + CameraRig = CameraCache.Main.gameObject.EnsureComponent(cameraRigType) as IMixedRealityCameraRig; + } + else + { + CameraRig = CameraCache.Main.transform.parent.gameObject.EnsureComponent(cameraRigType) as IMixedRealityCameraRig; + } + Debug.Assert(CameraRig != null); } @@ -265,9 +272,9 @@ public override void Disable() cameraTransform.rotation = Quaternion.identity; } - if (CameraRig.PlayspaceTransform != null) + if (CameraRig.RigTransform != null) { - CameraRig.PlayspaceTransform.gameObject.Destroy(); + CameraRig.RigTransform.gameObject.Destroy(); } if (CameraRig is Component component && @@ -444,13 +451,13 @@ protected virtual void ApplySettingsForTransparentDisplay() } /// - /// Resets the , , + /// Resets the , , /// and poses. /// protected virtual void ResetRigTransforms() { - CameraRig.PlayspaceTransform.position = Vector3.zero; - CameraRig.PlayspaceTransform.rotation = Quaternion.identity; + CameraRig.RigTransform.position = Vector3.zero; + CameraRig.RigTransform.rotation = Quaternion.identity; // If the camera is a 2d camera then we can adjust the camera's height to match the head height. CameraRig.CameraTransform.position = IsStereoscopic ? Vector3.zero : new Vector3(0f, HeadHeight, 0f); @@ -461,7 +468,7 @@ protected virtual void ResetRigTransforms() } /// - /// Called each to sync the , + /// Called each to sync the , /// , and poses. /// protected virtual void SyncRigTransforms() diff --git a/XRTK-Core/Packages/com.xrtk.core/Runtime/Providers/Controllers/BaseController.cs b/XRTK-Core/Packages/com.xrtk.core/Runtime/Providers/Controllers/BaseController.cs index bcebf4828..f55693ce5 100644 --- a/XRTK-Core/Packages/com.xrtk.core/Runtime/Providers/Controllers/BaseController.cs +++ b/XRTK-Core/Packages/com.xrtk.core/Runtime/Providers/Controllers/BaseController.cs @@ -176,10 +176,10 @@ private IMixedRealityPointer[] AssignControllerMappings(MixedRealityInteractionM for (int j = 0; j < interactionProfile.PointerProfiles.Length; j++) { var pointerProfile = interactionProfile.PointerProfiles[j]; - var playspaceTransform = MixedRealityToolkit.TryGetSystem(out var cameraSystem) - ? cameraSystem.MainCameraRig.PlayspaceTransform + var rigTransform = MixedRealityToolkit.TryGetSystem(out var cameraSystem) + ? cameraSystem.MainCameraRig.RigTransform : CameraCache.Main.transform.parent; - var pointerObject = Object.Instantiate(pointerProfile.PointerPrefab, playspaceTransform); + var pointerObject = Object.Instantiate(pointerProfile.PointerPrefab, rigTransform); var pointer = pointerObject.GetComponent(); if (pointer != null) @@ -229,11 +229,11 @@ public void TryRenderControllerModel(bool useAlternatePoseAction = false) // If we've got a controller model, then place it in the scene and get/attach the visualizer. if (!controllerModel.IsNull()) { - var playspaceTransform = MixedRealityToolkit.TryGetSystem(out var cameraSystem) - ? cameraSystem.MainCameraRig.PlayspaceTransform + var rigTransform = MixedRealityToolkit.TryGetSystem(out var cameraSystem) + ? cameraSystem.MainCameraRig.RigTransform : CameraCache.Main.transform.parent; - var controllerObject = Object.Instantiate(controllerModel, playspaceTransform); + var controllerObject = Object.Instantiate(controllerModel, rigTransform); Debug.Assert(controllerObject != null); controllerObject.name = $"{GetType().Name}_Visualization"; Visualizer = controllerObject.GetComponent(); @@ -270,4 +270,4 @@ void SetupController(IMixedRealityControllerVisualizer visualizer) } } } -} \ No newline at end of file +} diff --git a/XRTK-Core/Packages/com.xrtk.core/Runtime/Providers/Controllers/Hands/HandDataPostProcessor.cs b/XRTK-Core/Packages/com.xrtk.core/Runtime/Providers/Controllers/Hands/HandDataPostProcessor.cs index 0af95d19b..7873b5334 100644 --- a/XRTK-Core/Packages/com.xrtk.core/Runtime/Providers/Controllers/Hands/HandDataPostProcessor.cs +++ b/XRTK-Core/Packages/com.xrtk.core/Runtime/Providers/Controllers/Hands/HandDataPostProcessor.cs @@ -137,14 +137,14 @@ private HandData UpdateIsPointing(HandData handData) { if (handData.TrackingState == TrackingState.Tracked && !PlatformProvidesIsPointing) { - var playspaceTransform = CameraSystem != null - ? CameraSystem.MainCameraRig.PlayspaceTransform + var rigTransform = CameraSystem != null + ? CameraSystem.MainCameraRig.RigTransform : CameraCache.Main.transform.parent; var localPalmPose = handData.Joints[(int)TrackedHandJoint.Palm]; var worldPalmPose = new MixedRealityPose { Position = handData.RootPose.Position + handData.RootPose.Rotation * localPalmPose.Position, - Rotation = playspaceTransform.rotation * handData.RootPose.Rotation * localPalmPose.Rotation + Rotation = rigTransform.rotation * handData.RootPose.Rotation * localPalmPose.Rotation }; // We check if the palm forward is roughly in line with the camera lookAt. @@ -184,4 +184,4 @@ private HandData UpdatePointerPose(HandData handData) return handData; } } -} \ No newline at end of file +} diff --git a/XRTK-Core/Packages/com.xrtk.core/Runtime/Providers/Controllers/Hands/MixedRealityHandController.cs b/XRTK-Core/Packages/com.xrtk.core/Runtime/Providers/Controllers/Hands/MixedRealityHandController.cs index 622ce292f..d5a981489 100644 --- a/XRTK-Core/Packages/com.xrtk.core/Runtime/Providers/Controllers/Hands/MixedRealityHandController.cs +++ b/XRTK-Core/Packages/com.xrtk.core/Runtime/Providers/Controllers/Hands/MixedRealityHandController.cs @@ -126,17 +126,17 @@ private static IMixedRealityCameraSystem CameraSystem public string TrackedPoseId { get; private set; } /// - /// The hand's pointer pose in playspace. + /// The hand's pointer pose in the camera rig's local coordinate space. /// private MixedRealityPose SpatialPointerPose { get; set; } /// - /// The hand's index finger tip pose in playspace. + /// The hand's index finger tip pose in the camera rig's local coordinate space. /// private MixedRealityPose IndexFingerTipPose { get; set; } /// - /// The hand's grip pose in playspace. + /// The hand's grip pose in the camera rig's local coordinate space. /// private MixedRealityPose GripPose { get; set; } @@ -799,8 +799,8 @@ public bool TryGetJointPose(TrackedHandJoint joint, out MixedRealityPose pose, S // Translate to world space. if (CameraSystem != null) { - pose.Position = CameraSystem.MainCameraRig.PlayspaceTransform.TransformPoint(pose.Position); - pose.Rotation = CameraSystem.MainCameraRig.PlayspaceTransform.rotation * pose.Rotation; + pose.Position = CameraSystem.MainCameraRig.RigTransform.TransformPoint(pose.Position); + pose.Rotation = CameraSystem.MainCameraRig.RigTransform.rotation * pose.Rotation; } return lastHandRootPose != MixedRealityPose.ZeroIdentity; diff --git a/XRTK-Core/Packages/com.xrtk.core/Runtime/Providers/Controllers/Simulation/Hands/SimulatedHandDataConverter.cs b/XRTK-Core/Packages/com.xrtk.core/Runtime/Providers/Controllers/Simulation/Hands/SimulatedHandDataConverter.cs index 4d2d320a3..76093c889 100644 --- a/XRTK-Core/Packages/com.xrtk.core/Runtime/Providers/Controllers/Simulation/Hands/SimulatedHandDataConverter.cs +++ b/XRTK-Core/Packages/com.xrtk.core/Runtime/Providers/Controllers/Simulation/Hands/SimulatedHandDataConverter.cs @@ -205,13 +205,13 @@ private HandData UpdatePoseFrame() var position = PlayerCamera.ScreenToWorldPoint(ScreenPosition + JitterOffset); // At this point we know the hand's root pose in world space and - // need to translate to playspace. + // need to translate to the camera rig's local coordinate space. var rootPose = new MixedRealityPose(position, rotation); - var playspaceTransform = CameraSystem != null - ? CameraSystem.MainCameraRig.PlayspaceTransform + var rigTransform = CameraSystem != null + ? CameraSystem.MainCameraRig.RigTransform : CameraCache.Main.transform.parent; - rootPose.Position = playspaceTransform.InverseTransformPoint(rootPose.Position); - rootPose.Rotation = Quaternion.Inverse(playspaceTransform.rotation) * playspaceTransform.rotation * rootPose.Rotation; + rootPose.Position = rigTransform.InverseTransformPoint(rootPose.Position); + rootPose.Rotation = Quaternion.Inverse(rigTransform.rotation) * rigTransform.rotation * rootPose.Rotation; // Compute joint poses relative to root pose. var jointPoses = ComputeJointPoses(Pose, handedness); @@ -287,4 +287,4 @@ public void ResetConverter() } } } -} \ No newline at end of file +} diff --git a/XRTK-Core/Packages/com.xrtk.core/Runtime/Services/BoundarySystem/MixedRealityBoundarySystem.cs b/XRTK-Core/Packages/com.xrtk.core/Runtime/Services/BoundarySystem/MixedRealityBoundarySystem.cs index 920ee2b04..67ab5f3d9 100644 --- a/XRTK-Core/Packages/com.xrtk.core/Runtime/Services/BoundarySystem/MixedRealityBoundarySystem.cs +++ b/XRTK-Core/Packages/com.xrtk.core/Runtime/Services/BoundarySystem/MixedRealityBoundarySystem.cs @@ -68,19 +68,19 @@ public MixedRealityBoundarySystem(MixedRealityBoundaryProfile profile) private readonly Dictionary trackedObjects = new Dictionary(3); - private Transform playspaceTransform = null; + private Transform rigTransform = null; - private Transform PlayspaceTransform + private Transform RigTransform { get { - if (playspaceTransform == null) + if (rigTransform == null) { - playspaceTransform = MixedRealityToolkit.TryGetSystem(out var cameraSystem) - ? cameraSystem.MainCameraRig.PlayspaceTransform + rigTransform = MixedRealityToolkit.TryGetSystem(out var cameraSystem) + ? cameraSystem.MainCameraRig.RigTransform : CameraCache.Main.transform.parent; } - return playspaceTransform; + return rigTransform; } } @@ -98,7 +98,7 @@ private GameObject BoundarySystemVisualizationRoot } boundaryVisualizationRoot = new GameObject(nameof(BoundarySystemVisualizationRoot)); - boundaryVisualizationRoot.transform.SetParent(PlayspaceTransform, false); + boundaryVisualizationRoot.transform.SetParent(RigTransform, false); return boundaryVisualizationRoot; } @@ -184,7 +184,7 @@ private GameObject FloorVisualization return floorVisualization; } - var position = PlayspaceTransform.position; + var position = RigTransform.position; // Render the floor. floorVisualization = GameObject.CreatePrimitive(PrimitiveType.Cube); @@ -577,7 +577,7 @@ public bool IsInsideBoundary(Vector3 position, Space referenceSpace = Space.Worl // Handle the user teleporting (boundary moves with them). if (referenceSpace == Space.World) { - position = PlayspaceTransform.InverseTransformPoint(position); + position = RigTransform.InverseTransformPoint(position); } if (position.y < 0 || @@ -605,7 +605,7 @@ public bool TryGetRectangularBoundsParams(out Vector2 center, out float angle, o } // Handle the user teleporting (boundary moves with them). - var transformedCenter = PlayspaceTransform.TransformPoint(new Vector3(rectangularBounds.Center.x, 0f, rectangularBounds.Center.y)); + var transformedCenter = RigTransform.TransformPoint(new Vector3(rectangularBounds.Center.x, 0f, rectangularBounds.Center.y)); center = new Vector2(transformedCenter.x, transformedCenter.z); angle = rectangularBounds.Angle; diff --git a/XRTK-Core/Packages/com.xrtk.core/Runtime/Services/CameraSystem/DefaultCameraRig.cs b/XRTK-Core/Packages/com.xrtk.core/Runtime/Services/CameraSystem/DefaultCameraRig.cs index 7da56b180..8892c3b20 100644 --- a/XRTK-Core/Packages/com.xrtk.core/Runtime/Services/CameraSystem/DefaultCameraRig.cs +++ b/XRTK-Core/Packages/com.xrtk.core/Runtime/Services/CameraSystem/DefaultCameraRig.cs @@ -19,10 +19,10 @@ public class DefaultCameraRig : MonoBehaviour, IMixedRealityCameraRig #region IMixedRealityCameraRig Implementation [SerializeField] - private string playspaceName = "MixedRealityPlayspace"; + private string rigName = "XRCameraRig"; [SerializeField] - private Transform playspaceTransform = null; + private Transform rigTransform = null; /// public GameObject GameObject @@ -41,13 +41,13 @@ public GameObject GameObject } /// - public Transform PlayspaceTransform + public Transform RigTransform { get { - if (playspaceTransform != null) + if (rigTransform != null) { - return playspaceTransform; + return rigTransform; } if (MixedRealityToolkit.IsApplicationQuitting) @@ -55,29 +55,29 @@ public Transform PlayspaceTransform return null; } - var playspaceTransformLookup = GameObject.Find(playspaceName); + var rigTransformLookup = GameObject.Find(rigName); - playspaceTransform = playspaceTransformLookup.IsNull() - ? new GameObject(playspaceName).transform - : playspaceTransformLookup.transform; + rigTransform = rigTransformLookup.IsNull() + ? new GameObject(rigName).transform + : rigTransformLookup.transform; - if (CameraTransform.parent != playspaceTransform) + if (CameraTransform.parent != rigTransform) { - CameraTransform.SetParent(playspaceTransform); + CameraTransform.SetParent(rigTransform); } - if (BodyTransform.parent != playspaceTransform) + if (BodyTransform.parent != rigTransform) { - BodyTransform.SetParent(playspaceTransform); + BodyTransform.SetParent(rigTransform); } - // It's very important that the MixedRealityPlayspace align with the tracked space, - // otherwise world-locked things like playspace boundaries won't be aligned properly. - // For now, we'll just assume that when the playspace is first initialized, the + // It's very important that the rig transform aligns with the tracked space, + // otherwise world-locked things like boundaries won't be aligned properly. + // For now, we'll just assume that when the rig is first initialized, the // tracked space origin overlaps with the world space origin. If a platform ever does // something else (i.e, placing the lower left hand corner of the tracked space at world // space 0,0,0), we should compensate for that here. - return playspaceTransform; + return rigTransform; } } @@ -111,23 +111,23 @@ public Camera PlayerCamera if (playerCamera.transform.parent == null) { - playerCamera.transform.SetParent(PlayspaceTransform); + playerCamera.transform.SetParent(RigTransform); } else { - if (playerCamera.transform.parent.name != playspaceName) + if (playerCamera.transform.parent.name != rigName) { // Since the scene is set up with a different camera parent, its likely // that there's an expectation that that parent is going to be used for // something else. We print a warning to call out the fact that we're // co-opting this object for use with teleporting and such, since that // might cause conflicts with the parent's intended purpose. - Debug.LogWarning($"The Mixed Reality Toolkit expected the camera\'s parent to be named {playspaceName}. The existing parent will be renamed and used instead."); + Debug.LogWarning($"The Mixed Reality Toolkit expected the camera\'s parent to be named {rigName}. The existing parent will be renamed and used instead."); // If we rename it, we make it clearer that why it's being teleported around at runtime. - playerCamera.transform.parent.name = playspaceName; + playerCamera.transform.parent.name = rigName; } - playspaceTransform = playerCamera.transform.parent; + rigTransform = playerCamera.transform.parent; } Debug.Assert(CameraPoseDriver != null); @@ -187,13 +187,13 @@ public Transform BodyTransform if (bodyTransform == null) { - bodyTransform = PlayspaceTransform.Find(playerBodyName); + bodyTransform = RigTransform.Find(playerBodyName); } if (bodyTransform == null) { bodyTransform = new GameObject(playerBodyName).transform; - bodyTransform.transform.SetParent(PlayspaceTransform); + bodyTransform.transform.SetParent(RigTransform); } return bodyTransform; @@ -206,10 +206,10 @@ public Transform BodyTransform private void OnValidate() { - if (playspaceTransform != null && - !playspaceTransform.name.Equals(playspaceName)) + if (rigTransform != null && + !rigTransform.name.Equals(rigName)) { - playspaceTransform.name = playspaceName; + rigTransform.name = rigName; } if (bodyTransform != null && diff --git a/XRTK-Core/Packages/com.xrtk.core/Runtime/Services/DiagnosticsSystem/MixedRealityDiagnosticsSystem.cs b/XRTK-Core/Packages/com.xrtk.core/Runtime/Services/DiagnosticsSystem/MixedRealityDiagnosticsSystem.cs index 636b1fbb8..65f02cda0 100644 --- a/XRTK-Core/Packages/com.xrtk.core/Runtime/Services/DiagnosticsSystem/MixedRealityDiagnosticsSystem.cs +++ b/XRTK-Core/Packages/com.xrtk.core/Runtime/Services/DiagnosticsSystem/MixedRealityDiagnosticsSystem.cs @@ -37,19 +37,19 @@ public MixedRealityDiagnosticsSystem(MixedRealityDiagnosticsSystemProfile profil private MemoryEventData memoryEventData; private ConsoleEventData consoleEventData; - private Transform playspaceTransform = null; + private Transform rigTransform = null; - private Transform PlayspaceTransform + private Transform RigTransform { get { - if (playspaceTransform == null) + if (rigTransform == null) { - playspaceTransform = MixedRealityToolkit.TryGetSystem(out var cameraSystem) - ? cameraSystem.MainCameraRig.PlayspaceTransform + rigTransform = MixedRealityToolkit.TryGetSystem(out var cameraSystem) + ? cameraSystem.MainCameraRig.RigTransform : CameraCache.Main.transform.parent; } - return playspaceTransform; + return rigTransform; } } @@ -129,7 +129,7 @@ public Transform DiagnosticsRoot if (diagnosticsRoot.IsNull()) { diagnosticsRoot = new GameObject("Diagnostics").transform; - diagnosticsRoot.transform.SetParent(PlayspaceTransform, false); + diagnosticsRoot.transform.SetParent(RigTransform, false); } return diagnosticsRoot; diff --git a/XRTK-Core/Packages/com.xrtk.core/Runtime/Services/LocomotionSystem/LocomotionTargetOverride.cs b/XRTK-Core/Packages/com.xrtk.core/Runtime/Services/LocomotionSystem/LocomotionTargetOverride.cs index 458db5aec..9840ff345 100644 --- a/XRTK-Core/Packages/com.xrtk.core/Runtime/Services/LocomotionSystem/LocomotionTargetOverride.cs +++ b/XRTK-Core/Packages/com.xrtk.core/Runtime/Services/LocomotionSystem/LocomotionTargetOverride.cs @@ -14,7 +14,7 @@ namespace XRTK.Services.LocomotionSystem /// /// When no enabled instance of is found the /// will target the active - /// if the + /// if the /// is active or fallback to /// parent ultimately. /// diff --git a/XRTK-Core/Packages/com.xrtk.core/Runtime/Services/SpatialAwarenessSystem/MixedRealitySpatialAwarenessSystem.cs b/XRTK-Core/Packages/com.xrtk.core/Runtime/Services/SpatialAwarenessSystem/MixedRealitySpatialAwarenessSystem.cs index 39e80b8d9..a60b59e68 100644 --- a/XRTK-Core/Packages/com.xrtk.core/Runtime/Services/SpatialAwarenessSystem/MixedRealitySpatialAwarenessSystem.cs +++ b/XRTK-Core/Packages/com.xrtk.core/Runtime/Services/SpatialAwarenessSystem/MixedRealitySpatialAwarenessSystem.cs @@ -50,10 +50,10 @@ private GameObject CreateSpatialAwarenessParent get { var spatialAwarenessSystemObject = new GameObject("Spatial Awareness System"); - var playspaceTransform = MixedRealityToolkit.TryGetSystem(out var cameraSystem) - ? cameraSystem.MainCameraRig.PlayspaceTransform + var rigTransform = MixedRealityToolkit.TryGetSystem(out var cameraSystem) + ? cameraSystem.MainCameraRig.RigTransform : CameraCache.Main.transform.parent; - spatialAwarenessSystemObject.transform.SetParent(playspaceTransform, false); + spatialAwarenessSystemObject.transform.SetParent(rigTransform, false); return spatialAwarenessSystemObject; } } diff --git a/XRTK-Core/Packages/com.xrtk.core/Runtime/Utilities/Solvers/SolverHandler.cs b/XRTK-Core/Packages/com.xrtk.core/Runtime/Utilities/Solvers/SolverHandler.cs index 2eb171ef9..3b31f12e5 100644 --- a/XRTK-Core/Packages/com.xrtk.core/Runtime/Utilities/Solvers/SolverHandler.cs +++ b/XRTK-Core/Packages/com.xrtk.core/Runtime/Utilities/Solvers/SolverHandler.cs @@ -233,8 +233,8 @@ protected virtual void AttachToNewTrackedObject() case TrackedObjectType.Body: TrackTransform(cameraSystem.MainCameraRig.BodyTransform); break; - case TrackedObjectType.Playspace: - TrackTransform(cameraSystem.MainCameraRig.PlayspaceTransform); + case TrackedObjectType.Rig: + TrackTransform(cameraSystem.MainCameraRig.RigTransform); break; default: throw new ArgumentOutOfRangeException();