How to make each component of a 3D OpenGL object t

2019-09-21 22:20发布

let's say I have a 3d car model displayed using GLSurfaceView in Android. This model consists of many components, is that possible to control each of them or make each of them response to touch events individually? for example, if I want to select one wheel, what I need to do is touch the wheel.

1条回答
淡お忘
2楼-- · 2019-09-21 23:11

I think you are looking for ray picking or ray intersection.

This answer has a link to a iOS sample/video which I believe is what you are after. https://gamedev.stackexchange.com/questions/12360/how-do-you-determine-which-object-surface-the-users-pointing-at-with-lwjgl/12367#12367

Another related SO question: Implementing Ray Picking

That should get you started on what you need to do.

查看更多
登录 后发表回答