pivotOffsetFromAnchor
pivotOffsetFromAnchor(
anchor,pw,ph):object
Defined in: ui/src/UILayoutSystem.ts:161
World-space pivot offset: compute the offset to add to a Transform position so that the named corner of the panel sits at the Transform.
Anchor.Center returns (-pw/2, -ph/2) (panel center at Transform).
Anchor.BottomCenter returns (-pw/2, -ph) (panel’s bottom-center at
Transform — the natural “hovers above this entity” primitive for
health bars / nameplates).
Parameters
Section titled “Parameters”anchor
Section titled “anchor”number
number
Returns
Section titled “Returns”object
x:
number
y:
number