By niravsportz
on Wed, 01/15/2014 - 04:49
I am trying to develop a game wherein a user can swipe a ball into an Augmented 3D Goal post. For this I am using the Java API provided by the latest Vuforia SDK for android -(version 2.8) . I am overlaying a new view on the glview to display the ball and it is the same view which handles all the touch and swipe events. I want to detect the 2d mapped cordinates of the Goal post , so that I can find out the intersection of the Goalpost frame and the frame of the ball object to determine whether the ball was flicked correctly into the goal or outside the goal . My query is how do I detect the coordinates of the Augmented 3d Goal post and map it to my 2d screen coordinates .
How to detect coordinates of the Augmented 3D Object
Hi, you need to follow these steps:
- project the 3D point from the local reference frame of your target to the camera space.
- convert the projected point from camera space to screen space
This is described here (C++ version):