Log in or register to post comments

Positions of virtual objects on the screen

June 7, 2012 - 12:09am #1

I want to use some virtual objects as buttons. For this I need to things:

1. Compute the position on the screen of each virtual object.
2. Obtain the rotation of a object, projected to the screen.

Can anyone recommend me a way I could do it?

Thanks in Advance!

Re: Positions of virtual objects on the screen

June 11, 2012 - 2:29am #4

As kaharoth said, I too would recommend looking at the Dominoes sample. Took me a we while before I actually worked out what was going on. It is quite confusing.

Essentially your drawing a line from where you tap on the screen to the view frustum far plane and checking to see whether this intersects with a bounding surrounding your object.

Every frame render you check if a touch is happening then handle that touch event.

I have to say the code isn't very well commented so it makes things a little more difficult.

Rob.

Re: Positions of virtual objects on the screen

June 7, 2012 - 12:57pm #3

Here are some examples for Unity - http://ar.qualcomm.at/node/2000505

Re: Positions of virtual objects on the screen

June 7, 2012 - 4:10am #2

Hi,
check in the developer guide the samples section, in particular if you look at the code of dominoes you can understand how to select virtual objects.
Cheers,
John

Log in or register to post comments