Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Floor calibration of mixed reality inside unity

Discussion in 'VR' started by Pescu, Jun 3, 2018.

  1. Pescu

    Pescu

    Joined:
    Jun 7, 2014
    Posts:
    17
    Hello, i would like to calibrate floor of the mixed reality from inside my app, the same way we can do it using "Room Adjustment". Is that possible? I am using SteamVR with [CameraRig]. I think at a possible solution, but it might not be a proper way. I was thinking to scale the CamerRig to archive my goal, but its not the right way, because the input of UnityEngine.XR.InputTracking.GetLocalPosition(UnityEngine.XR.XRNode.Head) will not be normalized as should be, from 0 to the person that use the VR height, but it would be something wrong, somethimes if the floor is calibrated badly (higher that the person really is) I get also negative input for the floor hight.

    So my question is, is there a way to calibrate microsoft mixed reality inside unity, as the Room Adjustment do?
     
  2. Unity_Wesley

    Unity_Wesley

    Unity Technologies

    Joined:
    Sep 17, 2015
    Posts:
    558
    I'm not sure there is a API that will grab the floor height or coordinates, at least I don't think there is a Microsoft API for that functionality. You might be able to engineer a few ways to grab the floor plane, either by using the bounds of the play space you set up and calculating where the floor is. Or maybe you can grab the height of the camera in order to calculate how tall the person is or how far the camera is from the ground to the persons head.
     
  3. SSilvermanAmat

    SSilvermanAmat

    Joined:
    Jan 25, 2023
    Posts:
    4
    I am also trying to figure out how to get the floor height data from Mixed Reality Portal while running a Unity App on VR device. I know I can make an offset to the rig in the unity simulation but I want to be able to set the floor height from unity and write to the mixed reality portal's room adjustment.