"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

Get Vuforia AR Camera Compass Direction

Hi - Am trying to figure out how to get Vuforia AR camera compass direction, i.e. North/South/East/West. Can someone guide me on the same?

Tried to use below, but CameraDevice.Instance does not have any attribute to get compass direction. Tried below, from a different Vuforia post, to see what attributes but this does not have any as well.

// Get the fields

IEnumerable cameraFields = CameraDevice.Instance.GetCameraFields();

// Print fields to device logs

foreach (CameraDevice.CameraField field in cameraFields) {

Debug.Log("Key: " + field.Key + "; Type: " + field.Type);

}

 

Hello,

Vuforia does not provide APIs for sensor outputs such as compass. However, you can use native OS APIs to get this information.

Here are a couple of links that may be helpful:

Android: https://developer.android.com/guide/topics/sensors/sensors_overview.html

mageshrathnam

Fri, 04/28/2017 - 02:31

In reply to by medabit

Hi - Thanks. But am trying to use it in a Unity project with Vuforia. So can you pls provide me some guidance on how to use this on the same?

paramlabs

Tue, 02/06/2018 - 19:54

Hi, did you find a solution to this question? We are having objects placed at geolocation but if we use Vuforia camera, the objects position resets. If we can know which world direction Vuforia camera is pointing to then we can adjust the objects accordingly.