Log in or register to post comments

Model Positioning with X Y coordinates

February 21, 2019 - 5:10am #1

Hello everyone,

Hopes you are going well.

We have a problem to place model with X Y coordinates from phone / camera position.

The concerned file is GroundPlaneRenderer.java from your samples SDK (mobile java SDK on Android Studio)

We want to place model, depend and from my current position. (phone / camera).

line 576 (based on sample in SDK)

                // Matrix to translate drone at a given distance in front of camera

                Matrix34F translationMat = new Matrix34F();

                float[] translationArray = new float[12];

                translationArray[0] = 1;

                translationArray[5] = 1;

                translationArray[10] = 1;


                Tool.setTranslation(translationMat, new Vec3F(0f, 0f, -3f));

We are placing X Y coordinate on last line in new Vec3F.

Maybe the current position can be useful ? we found line 474:


I think line 709 is only for rendering, but maybe it can depend on positioning ?

float[] droneMV = mMidAirPoseMatrix.getData();

Matrix.translateM(droneMV, 0, -0.75f, -0.375f, -0.75f);

The model is always placed on the position where I am launching the app...

Second question too (less "urgent"), what is the scale value in real world ? we have calculating in centimers, we tried in meters too, but we need before to succeed placing our object ;)

Thanks you in advance for your help,


Model Positioning with X Y coordinates

February 21, 2019 - 11:50am #2


Vuforia samples use meters as the default scale.


Vuforia Engine Support

Log in or register to post comments