Relative Content

Tag Archive for pythonpython-turtle

How to use distance between stretched objects in turtle python

I’m working on making a pong game as an exercise, and i’m trying to handle the ball direction after it hits the paddle, I want the ball to go straight if it hits the center of the paddle and to go up with an angle 135 if it hits the upper segment and to go down with an angle 225 if it hits the lower segment.
I couldn’t find any function that can help me to solve this issue in the turtle library,