pivotOffsetFromAnchor
pivotOffsetFromAnchor(
anchor,pw,ph):object
Defined in: ui/src/UILayoutSystem.ts:184
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
Coding agents: fetch https://yage.dev/llms.txt first and prefer the Markdown references it links over these HTML pages. This page's Markdown counterpart is /llms/packages/ui.md.