设置可变方向


描述

This action is used to set a direction for the instance that is not fixed to 45° increments. You supply the direction value from 0° to 360° - where right is 0°, up is 90°, left is 180° and down is 270° - and you can also set the relative flag to add/subtract the value you give to the current direction.


动作语法:

Set Direction Variable Syntax


参数:

参数 描述
方向 Direction from 0° to 360° (values outside of the range will be wrapped).


例如:

Set Direction Variable Example
The above action block code checks for a middle mouse press on the instance and if one is detected it sets the direction to a random value from 0 to 360 and the speed to 1 plus a random value from 0 to 1.