Question

In Pencil code, how to turn the turtle toward its move direction or toward a x,y point (relative to home)?

Était-ce utile?

La solution

You can use turnto:

help turnto
turnto(degrees) Turn to a direction. North is 0, East is 90: turnto 270
turnto(x, y) Turn to graphing coordinates: turnto 50, 100
turnto(obj) Turn to page coordinates or an object on the page: turnto lastmousemove

Is this what you need?

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top