Collision

Category: Listener Tier: Basic

Purpose

Detects collisions and overlaps with other physics objects, with filtering by name, group, material, or property.

Visual Reference

As added to your scene
Collision brick as it appears in the GDLink editor

When To Use

  • Damage on collision (player hits enemy)

  • Pickup items (player touches collectible)

  • Trigger zones (enter area to open door)

  • Ground detection (character on floor)

  • Projectile hits (bullet collides with wall)

  • Power-up effects (player touches speed boost)

Runtime Behavior

Triggers: When this object collides with another object that matches the specified filter criteria

Generated UI Mockup — showing expanded properties
Collision
-
x
Name:
Label this brick...
Type:
Any
Target:
v
Value:
v
Expose Scope:
Local
Expose Prefix:
collision
v
Expose Data
Invert

Properties

Property

Type

Default

Notes

Type

option

Any

What to check on collision

Target

string

Name/Group/Material/Property to match

Value

string

Expected property value (empty = just check existence)

Expose Data

bool

False

Write collider name, group, position, normal, and count into variables when the listener fires

Expose Scope

option

Local

Where exposed collision variables are written

Name Var

variable_name

Variable that receives the first matching collider name

Group Var

variable_name

Variable that receives the matched collider group

Position Var

variable_name

Variable that receives collision position/contact point

Normal Var

variable_name

Variable that receives collision normal

Count Var

variable_name

Variable that receives matching collision count

Active Var

variable_name

Variable that receives raw colliding state

Expose Prefix

string

collision

Compatibility fallback when explicit output variables are empty

Example Use Cases

Basic Damage Detection:

Collision(type=Any) -> AND -> Math(HP, Subtract, 10)
// Lose 10 HP when hitting anything

Pickup System:

Collision(type=Group, target=Collectibles) -> AND -> Sound(pickup) + Visibility(false)
// Play sound and hide item when player touches collectible

Enemy-Specific Damage:

Collision(type=Group, target=Enemies) -> AND -> Math(HP, Subtract, 25)
// Take 25 damage only from enemies

Ground Detection:

Collision(type=Property, target=is_ground, value=true) -> AND -> Property(grounded, Set, true)
// Set grounded=true when touching ground

Trigger Zone:

Collision(type=Object Name, target=Player) -> AND -> Message(door_open)
// Send door_open message when player enters zone