开发者

Move an object in OpenGL ES for iOS?

开发者 https://www.devze.com 2023-01-07 05:16 出处:网络
I want to move an object to a specific point on the screen. (Specifically, wherever the user touches, barring any collisions that may interfere.) What OpenGL ES call am 开发者_如何学JAVAI supposed to

I want to move an object to a specific point on the screen. (Specifically, wherever the user touches, barring any collisions that may interfere.) What OpenGL ES call am 开发者_如何学JAVAI supposed to use for this?


You need to use a equivalent method of gluUnProject, which transforms from screen coordinates to world coordinates. There is one implementation specific to iPhone here.

Basically, it uses the modelview and projection matrices to do the transformation.

0

精彩评论

暂无评论...
验证码 换一张
取 消