Skip to content

Commit 17e74ce

Browse files
committed
moved camera setting to 0,0,0 to MixedRealityManager
1 parent 7f754ff commit 17e74ce

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

Assets/MixedRealityToolkit/_Core/Managers/MixedRealityManager.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,7 @@ private void Initialize()
146146
}
147147
}
148148
#endif
149+
EnsureMixedRealityRequirements();
149150

150151
if (ActiveProfile.IsCameraProfileEnabled)
151152
{
@@ -229,6 +230,13 @@ private void Initialize()
229230
isMixedRealityManagerInitializing = false;
230231
}
231232

233+
private void EnsureMixedRealityRequirements()
234+
{
235+
// There's lots of documented cases that if the camera doesn't start at 0,0,0, things break with the WMR SDK specifically.
236+
// We'll enforce that here, then tracking can update it to the appropriate position later.
237+
CameraCache.Main.transform.position = Vector3.zero;
238+
}
239+
232240
#region MonoBehaviour Implementation
233241

234242
private static MixedRealityManager instance;

0 commit comments

Comments
 (0)