Scratch Modules Gallery

逆时针旋转

将角色绕坐标点逆时针旋转指定角度。

运动 旋转

Scripts

主脚本

define Rotate counterclockwise about (x :: custom-arg) (y :: custom-arg) (angle :: custom-arg) degrees
set [dx v] to ((x position) - (x position :: custom-arg))
set [dy v] to ((y position) - (y position :: custom-arg))
change x by ((((dx) * ([cos v] of (angle :: custom-arg))) - ((dy) * ([sin v] of (angle :: custom-arg)))) - (dx))
change y by ((((dx) * ([sin v] of (angle :: custom-arg))) + ((dy) * ([cos v] of (angle :: custom-arg)))) - (dy))

Variables / Lists

NameTypeScope
dxVariableSprite
dyVariableSprite

References