This project is read-only.

Finding object position

Apr 15, 2011 at 12:50 PM


Im working on a goblin project and I have a few questions. I would really appricate any answers provided.

  1. I generate a 3D object relative to the marker position and I would like to know the postion of this 3D object.
  2. I need to find the position of the guitar marker in a (640,480) image. When I use GuitarMarker. WorldTransformation it returns the world coordinates.

Thanks :)

Apr 17, 2011 at 7:11 PM



1.  This depends on how you have set up your scene.  If you make it like this:


Scene.Root->MarkerNode->TransformNode->GeoNode  then the 3DModel (the geonode) will have a fixed position (which you define by setting the translation component of the transformNode)


When working with markers following Tutorial8, the camera is fixed at 0,0,0


The marker node will have a translation and rotation based on its location relative to the camera


If you want the 3D object relative to the camera then you need to multiply the translation of the marker node by the translation you have placed between the markernode and the geoNode (The TransformNode in my chain above)


2.  Try reading the Translation property of the GuitarMarker..If you want rotation then read the Rotation propoerty.  You can use these to build a transformation object.


Apr 20, 2011 at 5:48 PM


Thank you very much for the detailed explanation. Please check this image

I manage to retreive finger cordinates using open cv and pass it to XNA. What I want to do is to see if there is a collision between the finger cordinates and the object generated by Goblin. Is the physics engine going to help me.

I would really appriciate if you could give me some guidance on this issue.