While reading this post, you might want to check this out (a picture about my problem)
So, Im programming a Volleyball game, where the user hits the ball from below or next to the ball.
In the picture if the user's green area and the ball collide, the ball should move to right and if the user's red area collide with the ball, the ball jumps up (and black is mix of these).
The problem is, that as the picture shows, I'd like to have the ball jump just up, not to the right. First the ball jumps up, yes, but the player goes still up and if/when the player is high enough, the ball's collision thinks I want the ball to go right too.So, in short:
any ideas how the collision detection in these kind of ball games is usually made? (or how the collision detection would ignore the green area if the ball is already on the red?)
edit: I figured that the program could store the "color" of the first collision to a variable and then ignore other collisions, but still the question remains, that how are those collisions usually handled?