Game development
Godot anchor offsets
Generate Control offsets from a target rectangle and anchor fractions.
Your inputs
Start with an exampleYour result
Example resultAa — A small example of your colors.
How it works
Each offset equals the target edge position minus its anchor fraction × parent dimension.
A centered 200×100 control in an 800×600 parent uses offsets −100, −50, 100, 50 at centered anchors.
Limits
Uses an unscaled, unrotated parent rectangle. Containers and minimum-size constraints may override the final layout.