From Test-Scratch-Wiki

Revision as of 05:20, 2 April 2018 by Dnowba (talk | contribs) (Created page with "{{:Eng:Point in Direction () (block)/translate}} {{Zho/积木 | 名 = 面朝 () 度 | sb = 面朝 () 度 | 类别 = 动作类积木 | 形...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

面朝 () 度
面朝 () 度
类别 动作类积木
形狀 条形积木

The Point in Direction () 积木 is a 动作类积木 and a 条形积木. The block points its 角色 in the specified 方向; this rotates the sprite.

There has been some confusion involving the number system due to the fact that 0 is straight up, rather than off to the right (the default direction) or off to the left (as in a protractor), and that it uses a -180 to 180 circle rather than a normal 360 degree circle. Despite complaints[1], no changes have been made.

用法示例

If a sprite must be turned and its direction is not known, this block can be used.

Some common uses for the Point in Direction () block:

  • Flipping a sprite
當收到訊息 [Flip v]
面朝 ((方向) + (180)) 度
  • Choosing where a cannon points
面朝 (詢問的答案) 度
  • Pointing vehicles towards a destination
面朝 (wanted destination) 度

应用

Main article: List of Block Workarounds

The block can be replicated with the following code:

右轉 @turnright ((wanted direction) - (方向)) 度

参见


参考

Cookies help us deliver our services. By using our services, you agree to our use of cookies.