In the monski pong project in chapter 2, there is an error in checking the ball position relative to the paddle. The collision detection routine in animateBall() (p.66 first edition) assumes the ball’s position is being checked from the center of the paddle. In order to make this possible, you need to set the rectMode to CENTER.  In the setup(), add


and all will be well.  The code example has been updated to reflect this.

© 2012 Making Things Talk Suffusion theme by Sayontan Sinha