Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

how to make a pythoon turtle follow another?

t1 = turtle.Turtle() #creating turtles
t2 = turtle.Turtle()
x = t1.xcor() # getting t1 coordinates
y = t1.ycor()
angle = t2.towards(x,y) # finding the angle
t2.setheading(angle)
t2.forward(75)
 
PREVIOUS NEXT
Tagged: #pythoon #turtle #follow
ADD COMMENT
Topic
Name
7+4 =