Detecting collisions between items

As a continuation of the preceding recipe, we can detect whether a rectangle item overlaps with another one. In fact, this can be achieved, assuming that we are working with shapes contained in rectangular boxes, using the find_overlapping() method from the Canvas class.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset