Unity Android X and Y axis are flipped

Include the following details while filing a bug report (edit as applicable):

  • Platform category: Unity
  • Device Model & OS version: Android
  • NSDK or Scaniverse version: 4.1.0-26051913

Steps to reproduce:

-Make builds for IOS and Android the SDK Unity sample project: GitHub - nianticspatial/nsdk-samples-csharp: Niantic Spatial Unity samples showcasing NSDK features in C# · GitHub
-Display the camera position for VPS2 sample in a textfield in the screen
-Observe that in IOS everything works fine, but in Android the axis X and Y are flipped.

I was working in IOS when I moved to Android only to see that everything fell apart. So far, I cannot move forward with Niantic SDK if Android isn’t going to work as expected.

Hi Esteban,

Thanks for reaching out. Give me some time to look into the issue on my end. Are there any videos that you can share as well to get a concrete idea of what I should be looking at.

In the original post I described what you have to do in order to check it:

  1. Modify VPS2 sample to display the camera coordinates
  2. Scan something to use it in the VPS2 sample
  3. Run the VPS2 sample in IOS observe the X,Y,Z coordinates work as expected
  4. Run the VPS2 sample in Android observe that X,Y coordinates are flipped.

I tried to make a conversion by myself unsuccessfully, but it makes no sense that the same code is working fine in IOS and is totally broken in Android. Investigating I’ve found some issues in regards with AR Foundation swapping the axis. It’s up to you to fix the core, I cannot do it from my side.

In the original post I described what you have to do in order to check it:

  1. Modify VPS2 sample to display the camera coordinates
  2. Scan something to use it in the VPS2 sample
  3. Run the VPS2 sample in IOS observe the X,Y,Z coordinates work as expected
  4. Run the VPS2 sample in Android observe that X,Y coordinates are flipped.

I tried to make a conversion by myself unsuccessfully, but it makes no sense that the same code is working fine in IOS and is totally broken in Android. Investigating I’ve found some issues in regards with AR Foundation swapping the axis. It’s up to you to fix the core, I cannot do it from my side.

[Discourse post]