void A_OverlayPivot (int layer, float wx = 0.5, float wy = 0.5, int flags = 0)
A_OverlayPivot
Availability
ZandroX only. Does not exist in Zandronum 3.2. Behaviour follows UZDoom's
A_OverlayPivot.Works in netgames. A player's client runs its own layers and takes each layer's jumps from the server — see Psprite layers.
Usage
Sets the point a layer turns and scales about
(A_OverlayRotate, A_OverlayScale). It is measured
from the corner A_OverlayPivotAlign picks, the top left by default.
With PSPF_PIVOTPERCENT, which a layer starts with, wx and wy are shares of the frame's
width and height: (0.5, 0.5) is its middle and (1, 1) the far corner. Without it they are
pixels.
Parameters
-
int layerThe layer.
0means the layer whose state is currently executing — see OverlayID. Does nothing if the layer does not exist. -
float wx,float wyThe pivot across and down. Default
0.5each, the frame's middle. -
int flags- WOF_KEEPX, WOF_KEEPY — leave that axis alone.
- WOF_ADD — add to the current pivot instead of replacing it.
- WOF_RELATIVE —
wxandwyare along the layer's turn rather than the screen's axes.
Examples
A dial that spins about its centre:
Dial:
DIAL A 0 A_OverlayPivot(OverlayID(), 0.5, 0.5)
DIAL A 1 A_OverlayRotate(OverlayID(), 6, WOF_ADD)
Wait