0

I have searched a lot about doing collisions between a circle and a rectangle, but I only found how to detect it.

Can someone explain me how to do it ?

Then, how can can I do it too when the rectangle is inclined ?

This is the values that I got :

  • Circle X position
  • Circle Y position
  • Circle radius
  • Rectangle X position
  • Rectangle Y position
  • Rectangle width
  • Rectangle height

Anyone know how to do it ? Thanks.

  • you are missing speed and time delta ... see [Can't flip direction of ball without messing up gravity](https://stackoverflow.com/a/53637567/2521214) for AABB, in case of inclined rectangle you either use [transform matrix](https://stackoverflow.com/a/28084380/2521214) to axis align or use this [Bouncing an object off a wall](https://stackoverflow.com/a/71827702/2521214) so no more rectangle but polygon (set of lines) instead ... – Spektre Jun 05 '22 at 06:27

0 Answers0