"We offer new support options and therefor the forums are now in read-only mode! Please check out our Support Center for more information." - Vuforia Engine Team

Camera off center !

Vuforia SDK Version: 4.2.3 - Description with steps to reproduce:

Hi,

this happens in 4.2.3 but also in the 3 version.

Reproduce on a Asus Google Nexus 7 in Unity:

- setup arcamera (+ framemarker but that part doesnt even matter)

- add cube as child of ARcamera, exactly in front of ARcamera, exactly in center of ARcamera, eg (0,0, 5)

- press play in Editor -> screen is rendered with cube in center of screen as expected

- build for android device CAMERA_FRONT -> screen is rendered with cube in center of screen as expected, but I see myself which is scary

- build for android device CAMERA_BACK -> screen is rendered with cube of center, eg top of cube touches device screen top, but on the bottom there is space left (like couple of millimeters, but that of course depends on cube size). If you rotate the device 180, everything rotates ok, but now the space is at the top.

In other words the ARcamera (0,0,0) does not seem to be at (visible_screen.width/2, visible_screen.height/2), and neither at (screen.width/2, screen.height/2)

 

I need to position objects exactly in front of the camera, aligned with screen edges, and everything works, except for this little 'feature'...

 

THanks in advance,

sorv

- Development OS (Mac OS X, Windows, Linux): Windows - Mobile OS and Version: Android 5 - Mobile Device Manufacturer and Model name: asus google nexus 7 - Do the Vuforia Sample Applications show the same behavior?: cannot verify this exact same setup

AlessandroB

Mon, 05/11/2015 - 08:32

On some devices the camera projection matrix coming from the device profile is not centered.
To find a position in the center of the view frustum, you can shoot a ray from the center of the camera rect against a plane at the depth you need;