Get Position of floor in Kudan Android

289 Views Asked by At

In unity, the code to get the floor's position is shown here. enter image description here

What's the equivalent form in android/java? I couldn't find anything similar in the documentation.

1

There are 1 best solutions below

0
On BEST ANSWER

The Native SDK APIs work differently to the Unity plugin. On Android specifically, you'll want to look at the ARGyroPlaceManager class. As stated in the method description for getWorld:

The world is placed where the camera normal intersects the floor plane.

So the position of the "floor" is the position of the Gyro Place Manager's world node. By simply saying:

ARGyroPlaceManager gpm = ARGyroPlaceManager.getInstance();
ARVector3 vector = gpm.getWorld().getPosition();

You can get the 3D position of the Gyro Place Manager's world and by extension, the 3D position of the "floor", much like you would receive in the Unity plugin.