I am corrently working on a flappy bird like game and I want to now how it is possible to detect a collusion. Currently the bird is just a rectangle. So I want to know how I in general can check if the rectangle is hitting an obstacle.
Greetings and thank you for your response
Here’s a page from stackoverflow, examples written in Java but the algorithm will work the same:
Another page with a more general discussion of collisions between circles, rectangles, and polygons, presented in order of complexity (circles are easiest, polygons are most complex):
If you like to learn via video, this YouTube tutorial by Abe Pazos showing overlapping objects and dist() function is very good:
in p5, but easily portable …
Thank you for all of your response. I used the link from GoToLoop but I might try the rest in the future.