设置重力方向


描述

This action is used to set the direction of the built in gravity variable. Each instance can have it's own gravity effect, and if the gravity value is set to anything other than zero, then the instance will be "pulled" in the direction set by this action. You can set a direction between 0° and 360° where right is 0°, up is 90°, left is 180° and down is 270°. Note that you can set this to be relative to the current gravity value, so whatever you input will be added/subtracted from that.


动作语法:

Set Gravity Direction Syntax


参数:

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


例如:

Set Gravity Direction Example
The above action block code sets various instance properties related to movement: gravity direction is set to down (270°), gravity force is set to 0.05, and friction is set to 0.2.