سؤال

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