How to get a Coordinates of a 3D Object in Android

| | August 11, 2015

How is it possible to click on an area of a 3D Model (.obj-File) for example a cube, where you can get different Events of the six sides. For Example the orange area of the picture gives me a value of an Integer. The Cube can be rotated 360°.

enter image description here

One Response to “How to get a Coordinates of a 3D Object in Android”

  1. I assume this cube is made of triangles. You can simply ray cast the scene and check Ray/Triangle intersection for every face triangle. The ray cast function will return the triangle index and the 3D intersection point, once you have this info you can do what you want. You need to look for Unproject and ray/triangle intersection.

Leave a Reply