GetBobOffset

From ZDoom Wiki
Jump to navigation Jump to search

Actor

native clearscope double GetBobOffset(double ticfrac = 0) const

Usage

Returns the current vertical offset from the calling actor's vertical position caused by its bobbing. Only valid for actors that have the FLOATBOB flag, which enables the bobbing behavior. Takes the FloatBobStrength into account.

Parameters

  • double ticfrac
The current fraction of a tic. This is only relevant if the function is called from a drawing function in UI scope, since they are called multiple times per tic (for example, in BaseStatusBar or EventHandler's RenderOverlay and RenderUnderlay functions.

Return value

  • double - the positive or negative offset relative to the calling actor's vertical position.

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