質問

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

役に立ちましたか?

解決

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?

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top