David Kay

David Kay

  • NA
  • 12
  • 7k

Object Type at Coordinate on Canvas

Jul 12 2011 6:07 AM
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.

Answers (7)