I am using this api to develop an AR game.

In this game, I use a tracker (Tracker A) to determine a battle field and some game unit,

I have another tracker (Tracker B) to determine another game unit and all of the unit are not do any translation.

Tracker A

- multi unit

- translation

Tracker B

- single unit

- no translation

Now, i want to calculate the distance between tracker A unit and tracker B unit.

But the API just return the modelview matrix and projection matrix of the tracker A and tracker B.

I don't know how to get the world location of these units.

I try to use following method to get the distance between tracker A and tracker B:

Math.sqrt(

Math.pow(trackerA.modelViewMatrix[12]- trackerB.modelViewMatrix[12], 2) +

Math.pow(trackerA.modelViewMatrix[13]- trackerB.modelViewMatrix[13], 2) +

Math.pow(trackerA.modelViewMatrix[14]- trackerB.modelViewMatrix[14], 2)

)

I try to move the tracker B to test it and it seem ok, but i am not sure is it correct.

I suppose above method is correct, but i cannot get the distance between tracker A unit and tracker B unit.

Because the tracker A unit had been translate.

Is it possible to get the world location of the game unit?

Great!