When detecting collisions in the usual manner:
local function collision( ball, event )
print("collision"); --this often gets printed twice or more
--award points
return true;
end
ball.collision = collision;
ball:addEventListener( "collision", ball );
I sometimes get 2 or more of these events. If I throw a ball at wall and it bounces off, I want to award points for the collision, but I end up awarding too many points because more than one collision gets detected. How do you prevent this? [import]uid: 52127 topic_id: 11907 reply_id: 311907[/import]