I make 2 objects(1. triangle (java.awt.polygon) and 2. rectangle(java.awt.rectangle)) and moved these objects by TIMER . My aim is to make these 2 objects collide and bounce back each other. The problem is Why they are not colliding and bounce (they only overlapped each other), when i used the (..if(intersect..) part(refer code below). The compiler(cmd) encounter error saying ["no suitable method found for intersects(Polygon)"].
i feel weird because before this when i create 2 rectangle(use java.awt.Rectangle) and using the (..if(intersects)...) it work perfectly. These 2 rect touch and bounced each other. I stuck at these part and I need a DEEPER answer to this, what does the error mean ? Thanks