如何将乌龟朝其移动方向转动?

时间:2014-04-09 08:26:39

标签: turtle-graphics

Pencil code中,如何将乌龟朝向其移动方向或朝向x,y点(相对于家)进行转换?

1 个答案:

答案 0 :(得分:1)

您可以使用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

这是你需要的吗?