Drawing > Transforms


Transforms

Move Pen (Drawing Origin)

move-pen-block

Moves the origin point of drawing to or by the specified amount.

To = Sets to the specified amount.
By = Adds the specified amount to the existing amount.

g.translate([NUMBER], [NUMBER]);
g.moveTo([NUMBER], [NUMBER]);

Space Conversion

Switch to Screen Space

screen-space-block

By default, when drawing on actors, the coordinates are relative to the actor. This blocks switches the origin point of drawing to screen coordinates. This allows you to draw HUD's and other graphics that are anchored to the screen (and are unaffected by the camera).

g.translateToScreen();

Switch to Actor Space

actor-space-block

Moves the origin point of the drawing to match the position of the specified actor.

g.translateToActor([ACTOR]);