这是一个经常被忽视的方法,人们重新实现了它,以及 turtle.distance().Is there any way to point the Turtle towards certain coordinatesAny help with this with be appreciated. 解决方案 What you're looking for is the turtle.towards() method, which returns the angle from the turtle's position to a target. It can be used in combination with the turtle.setheading() method:turtle.setheading(turtle.towards(x, y))The turtle.towards() method is flexible with respect to it arguments. It can take separate x and y values, a combined (x, y) tuple, or another turtle whose position it will target.It's a commonly overlooked method, that folks reimplement, along with turtle.distance(). 这篇关于将 Python Turtle 指向特定坐标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 10-11 06:57