How do I determine what is touched in 3D space from the screen?

后端 未结 4 807
萌比男神i
萌比男神i 2020-12-30 13:58

How do I use gl.gluUnproject in my OpenGL ES 1.1 android app to determine what is selected when the user touches the screen?

My understanding is that the touch event

4条回答
  •  别那么骄傲
    2020-12-30 14:36

    One thought I had was to cache the results of calling gluProject. This might only be practical when you are dealing with a fixed camera. At the end of any change in camera perspective, I can regenerate this cache of "touchables".

    This also has the added benefit of ensuring that I'm only testing input against things that will respond to being touched.

    I'd appreciate any thoughts on this approach!

提交回复
热议问题