BounceActor

From ZDoom Wiki
Jump to navigation Jump to search

bool BounceActor (Actor blocking, bool onTop) (New from 4.11.0)

Usage

Makes the actor calling the function bounce off the blocking actor. This uses the exact same logic as actor-to-actor bounces, but ignores ALLOWBOUNCEONACTORS. The caller and blocking actor do not need to actually be in physical contact for this function to work.

Parameters

  • blocking: The actor that the caller will bounce off of.
  • onTop: Specifies if the caller is bouncing on top of the actor, if they are, then only the callers' vertical velocity is altered.

Return value

Returns true if the caller successfully bounced.

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.