Collision detection between ball & bricks in brick breaker game [closed]

萝らか妹 提交于 2019-12-22 12:22:53

问题


How do you detect a collision between ball & bricks in a brick breaker game?


回答1:


Bounding Box Collision


That should get you started, and give you some terms to search for. Essentially you treat each brick as a bounding box. Based on the ball position you should be able to determine if the ball collides, this is based on the fact you treat the ball as a simple bounding box, with a set height and width.



来源:https://stackoverflow.com/questions/2678211/collision-detection-between-ball-bricks-in-brick-breaker-game

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!