How can I shoot a ball in a certain angle? When I press the Space key, the ball should be shot in a 45 degree angle. How can I do that?
The above applies an instantaneous force to the object. You could also set
To check for the space key being pressed (rather than held down), you want to do something like this: