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

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

  • 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°.

  • Answer:

    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.

csnewb at Game Development Visit the source

Was this solution helpful to you?

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.