开发者

Is there an easy way to do Per-Pixel collision detection on iPhone/UIKit?

I'm quickly prototyping an iPad game and have been using frame-based collision detection. It's very much needing per pixel collision detection. Is there an easy way to implement this or any guides I could look at to hacking together my ow开发者_如何学编程n? Google only brings up people in my similar predicament which does not bode well.


Ok. We had a game where we needed this.

One solution which worked was doing glreadpixel. But on the 3G, after a point when we added more objects in the game it became a bottleneck. 3GS, iPad and new iPhone/iPod should perform a lot better. Remember to read more, as glReadPixel is very costly and blocking call. But experimenting won't hurt.

Later we chose to use our own collision maps with curves and lines to do terrain collision. Similar to Box2d.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜