Object Type at Coordinate on Canvas
How can I determine what type of element is at a given coordinate on a canvas?
I am making tetris and have polygons dropping down the canvas. I wish to check position (50,50) for example, and see if that point contains a polygon or not.
Basically I want to do collision detection, and can't find an easy way to do it since my polygons are not all rectangular.