CSCI 1106 Movement and Collision Detection

Irregularly shaped sprites have large bounding boxes

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: wall 180° An Easier Bounce of the Wall Collision Detec:on •  Obs: We just described a special form of collision detec6on •  In general, collision detec6on is needed to detect if two or more sprites are intersec:ng or touching in some way •  Why is this useful? Mechanisms for Collision Detec:on •  Four ways to detect collisions: –  Cheap and fast: Check if bounding boxes overlap! –  Expensive and slow: Check if the points of one sprite intersect with the other –  Fast but specialized: Use geometry –  More complicated and fast: Use invisible sprites •  For most purposes, the second way suffices Bounding Boxes •  Defn: A bounding box of a sprite is the smallest orthogonal rectangle that can contain the sp...
View Full Document

This document was uploaded on 03/27/2014 for the course CSCI 1106 at Dalhousie.

Ask a homework question - tutors are online