AnchorPoint not affecting AbsolutePosition

The AbsolutePosition devhub page states

The GuiObject.AnchorPoint also influences the AbsolutePosition. This property, GuiBase2d.AbsoluteSize and GuiBase2d.AbsoluteRotation are a group of properties that all describe the final rendered orientation of a UI element.

Which doesn’t seem to be true.

Note, AnchorPoint on the X co-ordinate is 0.5. X position is 0.5. However, AbsolutePosition is 576 (which is not 1/2 of 1920)

To my assumption, according do what the devhub states, the AbsolutePosition on the X value should be 960

I think what the article means is that if you gave the UI element the exact same values for Position, the AbsolutePosition will change depending on the AnchorPoint you give it.

In your case the X component would be 960 if you left AnchorPoint as 0, 0, but because you’ve changed it to 0.5, that AnchorPoint has influenced the AbsolutePosition and now the X component is 576.

AbsolutePosition is always measured from the top left of the screen to the top left of the object.

I agree they could probably be a little clearer on it, by clarifying that changing anchor point changes the position of the object on screen, and therefore creates a different AbsolutePosition for the same Position input, however the property is still measured to the top left of the object.

1 Like

Oh that’s really confusing then :confused:

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.