I try to make a boing sound when the shape of the ball hits any other shape. What works. But it works too well ....
When the ball stops or begins to roll, it is constantly confronted with a touch, so that the sound of “boing” is constantly on.
I cannot find anything in the chipmunk documentation to tell me when two things constantly collide. Therefore, I think that I will have to somehow figure it out myself, perhaps with some kind of timer that compares the last collision with the current collision. But that sounds awkward to me.
Has anyone solved this problem? How did you solve it?
source
share