ShouldCollide(Entity, Entity)

shared
Called when two entities are about to collide. Return false to prevent the collision.

Arguments

  • entity1 Entity The entity colliding
  • entity2 Entity The entity colliding with entity1

Returns

  • unknown

Note: Returning is not required

Returning from hooks is not required. Only do so if you mean to override behaviour. The first hook that returns a value will be the final value, skipping all following hooks.

Examples

hook ShouldCollide – "Called when two entities are about to collide. Return false to prevent the collision."