"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 position retained after recreating Vuforia camera on Android

This issue is Android specific. The issue did not occur on iOS (iPhone 12 Pro).

Vuforia Version: 10.4.4 (same result using 10.5.5)

Unity Version: 2021.2.8f1

 

We recently updated from Vuforia version 9 to 10 and we have discovered an issue with the camera position being shifted when using the AR camera.

Currently, we hold the Vuforia behaviour and camera inside a prefab which we instantiate at runtime. When leaving AR mode in our app, we destroy the prefab containing the Vuforia behaviour, and instantiate a new one when re-entering AR mode.

The Vuforia camera position should start in position Vector3.zero which is initially true, however, after a few frames, the camera position shift to what it originally was when previously leaving AR mode. I'm a bit stumped at the moment, especially since this issue does not occur on iOS. I was wondering if there was something introduced in version 10 which could be causing this behaviour.

 

Devices tested:

OnePlus 6

Samsung Galaxy S21

Hey there,

 

Have you checked the World Center Mode? Could be that this is the reason why your camera is moving. You can read more about it here: https://library.vuforia.com/device-tracking/spatial-frame-reference#set-the-world-center-mode-in-unity

 

Thanks for the response. The World Center Mode is set to device. The behaviour is different on iOS (no offset) so I'm not so sure if that would be causing it.