Skip to content

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).

Anchor

number

number

object

x: number

y: number