androidunity-game-engineaugmented-reality8thwall-xr

8th Wall XR Camera position is not changing


I'm using 8th Wall XR version 1.0.9.3 and I think there is a problem with XRController class. XRCameraController class cannot get reality camera position using XRController.GetCameraPosition() method. In every update the method resumes zero for all position variables.

I tried to track down the source of the problem and then found that inside XRNativeBridge.cs under Android JNI there is a code like:

r.ptr.cameraExtrinsicPositionX = jr.Call<float>("cameraExtrinsicPositionX");
r.ptr.cameraExtrinsicPositionY = jr.Call<float>("cameraExtrinsicPositionY");
r.ptr.cameraExtrinsicPositionZ = jr.Call<float>("cameraExtrinsicPositionZ");;

which is supposed to take camera extrinsic position data from native call. Then I tried to decompile com.the8thwall.reality.app.xr.android.XRAndroid.java file from provided jar executable which jr.Call takes variables from to see if there is anything about it but no luck. All Java calls like jr.Call<float>("cameraExtrinsicPositionX") are returning zero.


Solution

  • 6DoF tracking is currently supported for Tango and ARKit enabled devices. For all other phones, as of today it falls back to 3DoF tracking and fixed surfaces, which explains why the position variables are zero.

    For more information on features supported for the platforms you're developing for, see https://docs.8thwall.com/xr/unity/#requirements