Download

Positioning widgets on a canvas using relative coordinates

Apr 28, 2021.Knowledge

To position widgets in relative space on a canvas panel, you’ll need to adjust both the Anchors and the Alignment. Note that when you’re working within the UMG editor, it will automatically adjust the Position field when the anchors are changed to keep the widget in the same physical location, so you’ll need to zero it out after adjusting the anchors.

For example, to place a widget in the bottom center of the canvas, you’ll use the following:

Anchor Minimum: 0.5, 1.0

Anchor Maximum: 0.5, 1.0

Alignment: 0.5, 1.0

Position: 0.0, 0.0

You can adjust those anchor positions to pick a new relative location for the widget, zeroing out the position values each time.