7
Answers

Object Type at Coordinate on Canvas

David Kay

David Kay

13y
1.9k
1
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)