CollisionUtilities

Check if a collision object matches the given layer mask

sort Weight: 10

Check if a collision object matches the given layer mask

Version: v5.0.0

STABLE

Inherits: RefCounted
Source: collision_utilities.gd
Parsing: AST-based for maximum accuracy with symbol typing


Methods

get_rect_tile_positions

Signature: static get_rect_tile_positions(p_map: TileMapLayer, global_center_position: Vector2, transformed_rect_size: Vector2) -> Array

Returns absolute tile coordinates overlapped by a rectangle centered at a world position.

Returns: Array

Static: true

Parameters:

  • p_map: TileMapLayer
  • global_center_position: Vector2
  • transformed_rect_size: Vector2

does_indicator_overlap_shape

Signature: static does_indicator_overlap_shape(tile_indicator: RuleCheckIndicator, shape: Shape2D, shape_owner: Node2D) -> bool

Tests collision between indicator and a target shape.

Returns: bool

Static: true

Parameters:

  • tile_indicator: RuleCheckIndicator
  • shape: Shape2D
  • shape_owner: Node2D

object_matches_layer_mask

Signature: static object_matches_layer_mask(collision_object: CollisionObject2D, mask: int) -> bool

Check if a collision object matches the given layer mask

Returns: bool

Static: true

Parameters:

  • collision_object: CollisionObject2D
  • mask: int