CollidedWith

From ZDoom Wiki
Jump to navigation Jump to search

Actor

virtual void CollidedWith(Actor other, bool passive)

Usage

Called after two actors have collided. Similar to CanCollideWith, but CanCollideWith is called before collision and, most importantly, doesn't guarantee that the collision will actually happen, in contrast to this function.

Note, this virtual is called back ONLY when a collision actually occurs. If you want to check and abort a potential collision instead, e.g to stop an actor made of multiple smaller actors from colliding with itself, use CanCollideWith instead.

Parameters

  • Actor other
The actor the caller collided with.
  • bool passive
Used to determine which actor is currently calling the function. If false, the actor that caused the collision is the current caller; otherwise the caller is the actor that is being collided with.

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