Unity Camera работает на Oculus Gear VR, но не на Oculus Go - PullRequest
0 голосов
/ 19 января 2019

Я новичок в Unity и Oculus, но создал сборку для Oculus Gear VR, которая работает.Как только я делаю сборку для Oculus Go, камера застревает лицом вниз и не распознает движения моей головы.

Я пробовал разные примеры OVRCameraRig, и даже при создании сцены из примера Oculus Utilities камера дает тот же результат.

В блоге Oculus я нашел упоминание«Камера: Oculus Go не имеет камеры и не может запускать приложения, которые зависят от доступа к камере».Я не понимаю этого, как Go выбирает представление?

Я понял, что иногда у работы с Mac есть свои проблемы, но я не думаю, что это как-то связано с этим.Я пробовал разные предустановки камеры и разные настройки сборки.

    [ClassInfo("This component fires an 'input' ray along its transform forward every frame.")]
    [SerializeField]
    protected string classInfo;

    //-----------------------------------------------------------------------------------------
    // Protected Fields:
    //-----------------------------------------------------------------------------------------

    protected LayerMask exclusionLayers = 0; // Layers to exclude from the raycast.
    protected float rayLength = 20f; // How far into the scene the ray is cast.

    //-----------------------------------------------------------------------------------------
    // Public Properties:
    //-----------------------------------------------------------------------------------------

    public IInputBroadcaster CurrentInteractible { get; private set; }
    public IInputBroadcaster LastInteractible { get; private set; } //The last interactive item

    //-----------------------------------------------------------------------------------------
    // Unity Lifecycle:
    //-----------------------------------------------------------------------------------------

    protected void Start() { StartCoroutine(RaycastLoopCoroutine()); }

    //-----------------------------------------------------------------------------------------
    // Private Methods:
    //-----------------------------------------------------------------------------------------

    private IEnumerator RaycastLoopCoroutine() {
        while (true) {
            yield return new WaitForEndOfFrame();
            PhysicsRaycast();
        }
    }

    private void PhysicsRaycast() {
        // Create a ray that points forwards from the camera.
        Ray ray = new Ray(transform.position, transform.forward);
        RaycastHit hit;

        // Do the raycast forweards to see if we hit an interactive item
        if (Physics.Raycast(ray, out hit, rayLength)) {
            IInputBroadcaster interactible = hit.collider.GetComponentInChildren<IInputBroadcaster>(); //attempt to get the VRInteractiveItem on the hit object
            CurrentInteractible = interactible;

            // If we hit an interactive item and it's not the same as the last interactive item, then call Over
            if (interactible != null && interactible != LastInteractible) interactible.BeginInput();

            // Deactive the last interactive item 
            if (interactible != LastInteractible) DeactiveLastInteractible();

            LastInteractible = interactible;
        }
        else {
            // Nothing was hit, deactive the last interactive item.
            DeactiveLastInteractible();
            CurrentInteractible = null;
        }
    }

    private void DeactiveLastInteractible() {
        if (LastInteractible == null) return;

        LastInteractible.EndInput();
        LastInteractible = null;
    }
}

}

Я искал везде и не вижу никого, кто бы упоминал эту проблему, поэтому я предполагаю, что яделаю что-то не так, но не могу понять разницу между камерой Oculus Gear и Oculus Go.

Буду очень признателен, если кто-нибудь сможет мне помочь!Спасибо!

...