<point in direction( (( 180 <-> <direction> ))
is not a perfect bounce no matter what, it only works on surfaces above or below the ball, for the side paddles you need to use
<if><touching[ side paddle <point in direction( (( 0 <-> <direction> ))
Last edited by kgordon (2009-06-13 21:27:03)
Offline
Sticky paddles are often caused by the ball changing direction more times than you really want it to, after you sense a collision. Be sure to put a WAIT after you change direction to give the ball time to get clear of the paddle before you start looking for the next collision.
If I am looking for the color black, for example, I will set up a Forever Loop looking for black, change the direction in it, then wait until NOT touching black before letting the loop continue, something like this
[blocks]
<when green flag clicked>
<forever if><touching color[ black
<turn cw( (( 180 <+> <pick random( -30 )to( 30 )))degrees>
<wait until><< <not> <touching color[ black >>
<end>
[/blocks]
Offline