Loading...

Logo
DocumentationBehaviorsObjectDraw
Object

Draw

Last updated November 27, 2020

Description

When executed, the Draw behavior will draw to the selected render texture. Note that the coordinates (0,0) represent the bottom left corner of the render texture.

Properties

Triggers Immediately

Units

You can set the units to be in meters (m), pixels (px) or percentage (%). Percentage is based on the render texture's dimensions. For example, the position (50%, 50%) will be at the center of the texture. Note that when using pixels, the position and scale may appear different on other devices due to the content scale factor.

Point

Set the (x,y) coordinates and a radius.

Pixel

Set the (x,y) coordinates of the pixel to draw.

Line

Set the (x,y) coordinates for the start and end points as well as the line thickness.

Circle

Set the (x,y) coordinates for the center as well as the radius and thickness to draw an outlined circle.

Rectangle

Set the (x,y) coordinates for the bottom left corner as well as the width and height for a filled in rectangle.

Polygon

Set an array of points [[x1,y1],...] to represent each point in the polygon.

Image Stamp

Select a load image behavior and set the stamp's (x,y) position and dimensions.

There will be an option to disable antialiasing which will benefit sprites that use a pixelated style.

Eraser

When toggled on, this will erase from the selected render texture instead of drawing to it.

Outputs

This behavior has no outputs.

Render Texture