List
Adjust scene orientation depending on target platform
Posted Date: 2019-03-22 16:50     Edited Date: 2019-03-25 1:12     Writer: inactive

1. SDK Version: 4.1.0
2. Development Environment: Unity-Android
3. Tracker/Scanner: //n.a.
4. License Type: Free
5. Target Device(Optional): multiple. PC / Moverio BT350 (possibly other)

Hello Maxst team.

When I change target platforms the scene orientation changes when using the Instant Tracker.


I've read the following documentation >> https://developer.maxst.com/MD/doc/4_1_x/unity/ex/instant 
It is mentioned in "Hardware Requirements for Android" section that:
"If your target device has no gyro or compass sensor, the engine can not find the initial pose. If there is no sensor value, our engine assumes the front scene as a ground plane."

I suppose this is the reason for the scene orientation to change. Can you confirm this?
I also noted that the code provided in that section of the documentation does not work in version 4.1.0, SensorManager is not part of the package. 

I currently solved the problem by reorienting the scene depending on the target platform.
I would like to know if the aforementioned supposition is the reason for the scene orientation.

Posted Date: 2019-03-25 1:12     Edited Date: 2019-03-25 1:12     Writer: inactive

Hi,

Thank you for your interest in our SDK!

From the bottom line, your assumptions are correct.

We use angle information to see how far the camera is currently tilted to create a tracker on a flat surface.

If gyro or compass is not available on some devices, Instant Tracker assumes the front scene as the ground plane. So you could feel something's wrong.

If you want to check whether the current device supports Android Rotation Vector or not, please refer to the following codes.


SensorManager mSensorManager = (SensorManager) getSystemService(SENSOR_SERVICE);

List<Sensor> sensors = mSensorManager.getSensorList(TYPE_ROTATION_VECTOR);
Log.i(TAG, "# sensor : " + sensors.size());
for(int i=0; i<sensors.size(); i++)
{
   Log.i(TAG, sensors.get(i).getName());
}
if(sensors.isEmpty())
{
   Log.i(TAG,"There is no Rotaion Vector");
}

 

Leo

Maxst Support Team