A_OverlayVertexOffset

From ZDoom Wiki
Jump to navigation Jump to search


Note: While the function described on this page is defined in the Actor class, it only works when called either from a PlayerPawn state, or from one of the StateProvider states handled by PSprite, such as Weapon's Ready/Fire/etc. state sequences or a CustomInventory's Use state sequence. It will have no effect in any other context (such as calling it from a weapon's DoEffect override). If there's a need to achieve a similar effect from a different context, obtain a pointer to the necessary PSprite and modify its fields directly.

Actor

action native void A_OverlayVertexOffset(int layer, int index, double x, double y, int flags = 0)

Usage

Allows for skewing of an overlay by manipulating the vertex directly. Note that modifications of the vertices are always relative to the rotation set by A_OverlayRotate.

Parameters

  • int layer
ID of the layer to modify.
  • int index
Vertices are accessed by an array, and this is the index of the array. Accepted ranges are between [0,3].
  • double x
Offsets the X position of the vertex to the right of the base position if positive.
  • double y
Offsets the Y position of the vertex to the bottom of the base position if positive.
  • {[c|int flags}}
Can be combined with |:
  • WOF_ADD - The input adds instead of replaces the current offset, and implies WOF_INTERPOLATE.
  • WOF_KEEPX - The 'x' parameter is ignored.
  • WOF_KEEPY - The 'y' parameter is ignored.
  • WOF_INTERPOLATE - Enables interpolation for the frame called on. For backwards compatibility however, A_OverlayOffset will override the current interpolation setting.

Examples

Nuvolachalk.png Note: This article lists no examples. If you make use of this feature in your own project(s) or know of any basic examples that could be shared, please add them. This will make it easier to understand for future authors seeking assistance. Your contributions are greatly appreciated.

See Also