'Updated Question - How to set the correct device camera with ARJS and Aframe?
I'm using the aframe with ARJS to build an Augmented Reality app. What I'm trying to do is to set the camera to stay fixed with my device camera. when I run my app I see the camera shifted up and left. This causes my AR video to be out of the image tracker area.
This is a question related to my question: Is there a way to set the default camera direction when a page loads, in a-frame?
Appreciate any help.
[UPDATE]
I found out that what is actually happening, is that the Aframe camera is selecting my wide-angle camera (Samsung A51). There is an open issue on the ARJS repository.
If someone knows how to avoid this issue, please leave your anwser.
Solution 1:[1]
Changing the Active Camera When the active property gets toggled, the component will notify the camera system to change the current camera used by the renderer:
var secondCameraEl = document.querySelector('#second-camera');
secondCameraEl.setAttribute('camera', 'active', true);
see - https://aframe.io/docs/1.3.0/components/camera.html#changing-the-active-camera
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Suraj Rao |