Search code examples
mrtk

Camera starts at floor level 2019.2 + MRTK v2.0.0


For some reason everytime I load the scene on my Hololens 1 the camera starts at floor level and the scene content doesn't appear to anchor to the floor in the real world..

Using the MRTK demo project files I've created a scene and added in the MRTK packages, configured spatial perception in the player settings, turned on the spatial awareness settings, set to room scale, added observers (checked they're working), added the spatial collider and renderer to an empty game object, and scratched my head many times..

Anyone know what I'm missing/doing wrong?

Unity editor screenshot: Editor


Solution

  • On HoloLens (1st gen and 2) the origin of the world is at the head. From the image you posted, it appears you are designing a VR style scene. In VR, the origin is generally the floor.

    As @Perazim mentions, for VR style scenes on HoloLens, you will want to adjust the content placement to account for the origin being at the head. In the Mixed Reality Toolkit example scenes (ex: Demos\HandTracking\Scenes\HandInteractionExamples) the content is contained within a SceneContent object to facilitate easy adjustment.

    The older, HoloToolkit contained a script that may come in handy in your scenario. While we have not yet ported it to MRTK v2.x, it should be reasonably straight forward to update.

    Hope this helps!