# Circle collisions, need help here!

**URL:** <https://forum.kirupa.com/t/circle-collisions-need-help-here/82187>\
**Category:** flash\
**Created:** [March 8, 2005, 10:28am UTC](https://forum.kirupa.com/t/circle-collisions-need-help-here/82187 "2005-03-08T10:28:13Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Parasite](https://avatars.discourse-cdn.com/v4/letter/p/e495f1/32.png) [@Parasite](https://forum.kirupa.com/u/Parasite)\
**Post date:** [March 8, 2005, 10:28am UTC](https://forum.kirupa.com/t/circle-collisions-need-help-here/82187/1 "2005-03-08T10:28:13Z")

</div>

Hi there. I’m developing a game atm, and I need some help on the mathematics/coding of colliding circles (and their change in x/y speed). Didn’t post this in the gameforum, as it is really not a game-related question.

What i need to know is how to calculate the direction and speed a circle has after colliding with a static (non-moving) circle. I know how to detect a collision between the two, but I’m not sure about the maths I need to give the circle the right speed and direction after the collision

![](http://www.you-me.no/forklaring.jpg)  
If i do know how far away the two circle-points (in the middle of each) are to each other (in both x and y coords) would it be easy for me to find the new speed and direction of the large circle in the example above? I know that I somehow should use the angles to pretend the circle hits a flat “wall” (as it only hits one point), and then calculate the new speed/direction. My only problem is that I’m not sure how to decide the angle of this flat “wall” and how x and y speeds should change when colliding with a wall that is angled. Does anyone here have any insight, links or tips on how I can du this?

Help would be much appreciated!
