Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我只是在 Android 平台上玩基本的动画。到目前为止,我所拥有的允许用户触摸屏幕,并且以触摸为中心的圆圈将增加其半径,直到用户抬起手指或圆圈碰到屏幕边缘。我设置了一个类来存储每个圆的中心和半径,以便将每个圆都绘制到屏幕上。当一个圆撞到另一个圆时,使圆停止增加其半径的最佳方法是什么?
让我为你谷歌一下
http://badasshat.blogspot.com/2010/03/2d-collision-detection-part-1.html