colour collision detection ics3 mr. brunton. there are many ways to detect a collision in...

5
Colour Collision Detection ICS3 Mr. Brunton

Upload: tyler-norman

Post on 13-Dec-2015

218 views

Category:

Documents


2 download

TRANSCRIPT

Colour Collision Detection

ICS3Mr. Brunton

There are many ways to detect a collision in programming. The easiest way is to use colour collision detection.

What you will do is test the colour of the pixel just beyond the edge of your character (in this case, a ball).

RUN WINDOW

Use the get statement to determine the colour of the pixel one beyond the edge of the ball (mouseX+11).

Do that at least 4 times (top, bottom, right, left).

Allows you to exit a program when you want.

Not equal to OR(under the backspace key)