i am new in 2d animation, and now learning the basic collision detection and stuck at this part . For the code below there are four objects. Rectangle, triangle, hexagon, circle(only circle is static). I can make the
rectangle - triangle collide/bounced (horizontally) each other. But when it come to hexagon - triangle (vertically), i cannot make it collide because i am using wrong method right(line 154-166) ?
What i understand from my research (youtube/ google) to get polygon-polygon collide is, we need to change the polygon to rectangle by using the code below right ? ( correct me if im wrong).
my question is
how do i use the above code to put it in the below code. and what i need to add to make hexagon - triangle collision happen. Appreciated if you can give hint or link to make me easier to understand. Thanks