By qilin
on Wed, 11/14/2012 - 20:57
Im developing an AR app where I want a aim/crosshair as a overlay over the camera view.
When the aim/crosshair aims at a object the crosshair will activate and show "something in the aim". I then have a "shoot" button in the overlay that will "shoot" the object.
How can I detect "object in aim" and which object is in the aim.
Its simple geometry objects, cubes, planes and spheres with textures.
Aiming at objects
Hi, I'm not an expert on the topic but here's something you could try. Once you retrieve pose matrix for a trackable, translate it to model-view matrix (convertPose2GLMatrix).
Aiming at objects
Hi, you can follow harism's suggestion, i.e. which means projecting the center point of your 3D model to your screen coordinates, so that than you can simply compare your 2D point with your aim/crosshair point in 2D
Aiming at objects
This thread also discusses a similar approach, in this case using some QCAR utility functions:
https://ar.qualcomm.at/content/error-projecting-point-screen