How Do I Find Out the Distance Of the Head From the Floor


Follow the steps below to use the Origin to find out the distance of the head from the floor.

  1. In Inspector of head, set Origin to WVR_PoseOriginModel_OriginOnHead.

  2. Inside your code, re-center the position of the head by calling the function below.

    Interop.WVR_InAppRecenter (WVR_RecenterType.WVR_RecenterType_RotationAndPosition);

    After re-centering, the position of head will be (0, 0, 0).

  3. Place the dominant controller on the floor to get the distance of the controller from the head.

    // Y-coordinate means the height relative to the Origin.
    WaveVR_Controller.Input (WaveVR_Controller.EDeviceType.Dominant).transform.pos.y;

    For example, if the y-coordinate value is -1.70, the distance of controller from the head is -1.70m. Simply change the negative y-coordinate value to positive to know the distance of the head from the floor.