Play roll sound when rolling and bounce sound when bouncing
Posted: Thu Feb 27, 2014 8:45 am
How do you know when the Ball is rolling on the ground? I have tried numerous things but they are not accurate. I want to play a bounce sound when the ball bounces, but when it is rolling, I want to play a rolling sound.
I have tried checking current.y == last.y but this doesn't work properly because if you bounce on an angle (not straight up and down) many times the ball will stay on the ground for an unnoticeable amount of time which causes it to play the rolling sound which it shouldn't.
I have tried checking current.y == last.y but this doesn't work properly because if you bounce on an angle (not straight up and down) many times the ball will stay on the ground for an unnoticeable amount of time which causes it to play the rolling sound which it shouldn't.