File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
org.mixedrealitytoolkit.input/Visualizers/PlatformHandVisualizer Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 22// Licensed under the BSD 3-Clause
33
44using System . Collections . Generic ;
5+ using Unity . XR . CoreUtils ;
56using UnityEngine ;
67using UnityEngine . XR ;
78
@@ -102,7 +103,8 @@ protected void Update()
102103
103104 // This hand mesh is provided pre-translated from the world origin,
104105 // so we want to ensure the mesh is "centered" at the world origin
105- transform . SetPositionAndRotation ( Vector3 . zero , Quaternion . identity ) ;
106+ Transform playspace = PlayspaceUtilities . XROrigin . CameraFloorOffsetObject . transform ;
107+ transform . SetPositionAndRotation ( playspace . position , playspace . rotation ) ;
106108 }
107109 }
108110#if MROPENXR_PRESENT && ( UNITY_STANDALONE_WIN || UNITY_WSA || UNITY_ANDROID )
@@ -123,7 +125,7 @@ protected void Update()
123125 initializedUVs = true ;
124126 }
125127
126- transform . SetPositionAndRotation ( pose . position , pose . rotation ) ;
128+ transform . SetWorldPose ( PlayspaceUtilities . TransformPose ( pose ) ) ;
127129 }
128130#endif
129131 else
You can’t perform that action at this time.
0 commit comments