In order to get a vector from a direction I could do the following:
The problem is that this relies on
and GameMaker uses
How can I translate from gamemaker anticlockwise 90 = Up directions to the clockwise 0 = Up directions?
var dirX = dsin(direction) var dirY = dcos(direction)
0 = Up 90 = Right 180 = Down 270 = Left
0 = Right 90 = Up 180 = Left 270 = Down