Reset the Camera Transform with MRTK and Hololens

1.2k views Asked by At

I am currently developing an application for hololens 1 with Unity and MRTK and i would like to perform a very simple task.

Reseting the camera transform to the origin.

I try some actions but all with no sucess :

  • Get the camera and play space and set their position and rotation at 0.
  • Get the "MixedRealityCameraSystem" via the MRTK and use the Reset() function.

Indeed, the camera position is controlled by the user head and once the app is started i don't know how to recenter this position.

Does anyone know if there is a way to simply reset the camera transform ?

Thank you very much in advance for your time and help.

1

There are 1 answers

1
Hernando - MSFT On BEST ANSWER

As mentioned above, you cannot modify the camera position at runtime.

But If what you are interested in is only the position data. As a workaround, we recommend that you offset the position data of the camera before outputting it. Specifically, you first calculate the correction value between the camera and origin of the coordinate system before load your next scene. Then, after loading the new scene, subtract the correction value when outputting the head position log information.