Log in or register to post comments

Synthenize the coordinate matrix between Image targets.

December 26, 2010 - 5:11am #1

Hello pro, anybody show me how to calculate the relation between coordinate matrix of each image targets. I want to do some collision detection between 2 object of each ITarget. For ex: image A causes character A, image B causes character B. A shoots B. Please help me.

Re: Synthenize the coordinate matrix between Image targets.

March 31, 2011 - 7:15pm #3

Thanks a lot for your response.

I'm still having problems in understanding the orientation offset between targets: how should we interpret this offset matrix ? Does it only represent the offset in position between the targets ?

And from this offset matrix, how can we compute the coordinate of an object relative to a Target if we know the coordinate relative to the other target ?
I need this to solve the problem of detecting collision of two objects in two different Targets.
Do we just transform the vertices in B using the offset matrix as the transform, like in the Dominoes sample:
verticesToA = SampleMath::Vec3FTransform(verticesToB, offsetAB);

Re: Synthenize the coordinate matrix between Image targets.

December 26, 2010 - 11:26am #2

I'm currently out of town for the holiday, so I can't test this... But I'm pretty sure this is what you need to do:

1) Get the pose matrix for target A and target B. We'll call these pose A and pose B.

2) Invert pose B (the Dominoes sample app includes a matrix invert function).

3) Multiply pose A by the inverted pose B.

Now you should have a matrix that describes the orientation offset between targets A and B. Give this a try, and if you're still having trouble I'll be able to help more in a couple days when I can code it up :)

- Kim

Log in or register to post comments