Direction

From GMWiki, the Gamemaker Wiki.

Jump to: navigation, search

Direction is a built-in local variable that defines the current direction of movement for an instance. If given a value for speed, this is the direction it will move. This variable is mostly useful in top-view shooters, as it allows the user to rotate an object, in effect aiming a weapon. It is also useful in First Person Shooters, for the same reason. An advanced user can set up a script to easily turn with a simple code.

Direction is measured in degrees, starting with 0 being right and increasing counter-clockwise.

Retrieved from "http://gmwiki.org/Direction"
Personal tools