mgsx-dev/gdx-gltf

How to check 3d clicks?

resatkrlc opened this issue · 2 comments

Hello, i have 3d tiles in my game. I've added them to my array list. so question is, how to dedect 3d clicks? I mean i want to get true or false when clicked a tile. thanks

@resatkrlc you will do it the same way you do for any libgdx application.

From the camera you can get the ray, then you can use the Intersector to check where the ray is interesecting the plane Z=0
Then you can easily check what tile is intersected.

Intersector.intersectRayPlane

@resatkrlc please use Discord instead of the bug tracker when asking for help.