Game Maker
Register
Advertisement
Set direction and speed of motion

This action's popup window.

Move Free (also called Set direction and speed of motion) is the second way of specifying a motion, where you can indicate a precise direction.

Usage[]

Direction is measured as an angle between 0 and 360 degrees, going counter-clockwise from the right (90 indicates an upward direction). If you want a random direction, you can type random(360). As you will see below the function random gives a random number smaller than the indicated value.

Speed rather obviously means the speed at which the object will now be traveling.

As you might have noticed there is a checkbox labeled "Relative". If you directioncheck this, the new motion is added to the previous one. For example, if the instance is moving upwards and you add some motion to the left, the new motion will be diagonally upwards to the left. The speed is not taken relatively!

See Also direction[]

Advertisement