Esempio n. 1
0
        public void FindSafetyInnerRadius()
        {
            float innerRadius = -1.0f;
            bool  success     = GvrHeadset.TryGetSafetyCylinderInnerRadius(ref innerRadius);

            Debug.Log("Safety region inner radius success " + success + "; value " + innerRadius);
        }
Esempio n. 2
0
        public void FindSafetyInnerRadius()
        {
            float innerRadius = -1.0f;
            bool  success     = GvrHeadset.TryGetSafetyCylinderInnerRadius(ref innerRadius);

            Debug.Log("Safety region inner radius success " + success + "; value " + innerRadius);
            // Don't activate the safety cylinder visual until the radius is a reasonable value.
            if (innerRadius > 0.1f)
            {
                safetyRing.SetActive(true);
                safetyRing.transform.localScale = new Vector3(innerRadius, 1, innerRadius);
            }
        }