# How to go about making circles with collisions?

**URL:** <https://discourse.processing.org/t/how-to-go-about-making-circles-with-collisions/20497>\
**Category:** Coding Questions\
**Created:** [May 5, 2020, 8:53am UTC](https://discourse.processing.org/t/how-to-go-about-making-circles-with-collisions/20497 "2020-05-05T08:53:33Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Salttt](https://avatars.discourse-cdn.com/v4/letter/s/73ab20/32.png) [@Salttt](https://discourse.processing.org/u/Salttt)\
**Post date:** [May 5, 2020, 8:53am UTC](https://discourse.processing.org/t/how-to-go-about-making-circles-with-collisions/20497/1 "2020-05-05T08:53:33Z")

</div>

I want to make a projectile that is a sphere in a 2d game I am creating. I want to make it have a hitbox, is there a way to do it where the hitbox is smooth, rather than being a bunch of smaller rectangles?

---

<div class="post-metadata">

**Author:** ![Yom](https://avatars.discourse-cdn.com/v4/letter/y/c4cdca/32.png) [@Yom](https://discourse.processing.org/u/Yom)\
**Post date:** [May 5, 2020, 4:05pm UTC](https://discourse.processing.org/t/how-to-go-about-making-circles-with-collisions/20497/2 "2020-05-05T16:05:50Z")

</div>

I found this: [https://processing.org/examples/circlecollision.html](https://processing.org/examples/circlecollision.html)

---

<div class="post-metadata">

**Author:** ![jeremydouglass](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jeremydouglass/32/20_2.png) [@jeremydouglass](https://discourse.processing.org/u/jeremydouglass)\
**Post date:** [May 5, 2020, 9:51pm UTC](https://discourse.processing.org/t/how-to-go-about-making-circles-with-collisions/20497/3 "2020-05-05T21:51:20Z")

</div>

See also:

- [http://www.jeffreythompson.org/collision-detection/point-circle.php](http://www.jeffreythompson.org/collision-detection/point-circle.php)
- [http://www.jeffreythompson.org/collision-detection/circle-circle.php](http://www.jeffreythompson.org/collision-detection/circle-circle.php)
