Hi I am making a program where I have a football which I have to hit against a wall with 3 hoops each of them have a points depending on which one i hit.
the problem im having is I seems to cannot get the ball to translate towards the z axis in order to reach the wall using glutKeyFunc.
The user controls the game with arrow keys.
left key - to aim the ball left
right key - to aim the ball right
up key - to aim the ball up
down key - to aim the ball down
z key – to shoot the ball against the wall.
The aim of the game is to hit a hoop and score the points
shown inside the hoop.
Once all the hoops are hit the game ends.
Please can you help me as I am really confused what to do here, i have tried a method but it seems to not have worked.