Movement

Category: Listener Tier: Basic

Purpose

Detects when an object is moving, stopped, accelerating, or changing direction.

Visual Reference

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

When To Use

1. Animation State Machine (Idle -> Walk -> Run)

**Idle to Walk**
Movement Listener (Mode: Velocity, Threshold: 0.5, Greater)
-> AND Gate
-> Animation Executor (Play: "walk")

**Walk to Run**
Movement Listener (Mode: Velocity, Threshold: 5.0, Greater)
-> AND Gate
-> Animation Executor (Play: "run")

**Back to Idle**
Movement Listener (Mode: Is Stopped, Threshold: 0.1)
-> AND Gate
-> Animation Executor (Play: "idle")

2. Fall Damage Trigger

Movement Listener (Mode: Velocity, Axis: Y Only, Threshold: -15.0, Less, Expose Data: true)
-> Collision Listener (Group: "ground")
-> AND Gate
-> Property Executor (Set Global "player_health" -= abs(movement_velocity.y) * 0.5)

Take damage proportional to fall velocity.

3. Boost Trail Effect

Movement Listener (Mode: Velocity, Threshold: 20.0, Greater)
-> AND Gate
-> Visibility Executor (Show: "BoostTrailParticles")

Show trail particles when moving fast.

4. Direction Change Footsteps

Movement Listener (Mode: Direction Change, Tolerance: 30.0)
-> AND Gate
-> Sound Executor (Play: "footstep_turn.wav")

Play sound when player pivots sharply.

5. Detect Sudden Stop (Car Brakes)

Movement Listener (Mode: Acceleration, Threshold: -10.0, Less, Expose Data: true)
-> AND Gate
-> Sound Executor (Play: "tire_screech.wav")
-> Animation Executor (Play: "brake_lights")

High deceleration triggers brake effects.

6. AFK Detection

Movement Listener (Mode: Is Stopped, Threshold: 0.1)
-> Delay Listener (Duration: 60.0, Repeat: false)
-> AND Gate

...

## Runtime Behavior

**Evaluates**: TRUE when object's movement matches specified criteria

```{raw} html
<div class="illustration-container">
        <div class="illustration-box">
            <div class="box-header">Generated UI Mockup — showing expanded properties</div>
            <div class="real-node brick-listener">
                <div class="real-header">
                    <div class="real-title"><span class="brick-icon-fallback"></span> <span>Movement</span></div>
                    <div class="real-controls"><div class="real-checkbox"></div><div class="real-btn">-</div><div class="real-btn">x</div></div>
                </div>
                <div class="real-inner-panel"><div class="real-row name-row" style="position:relative;"><span class="real-label">Name:</span><div class="real-input" style="color:#666; font-style:italic;">Label this brick...</div><div class="real-port" style="right:-15px;"></div></div><div class="real-row"><span class="real-label">Detection:</span><div class="real-input-dropdown">Velocity</div></div><div class="real-row"><span class="real-label">Threshold:</span><div class="real-inline-input" style="border-bottom: 1px solid #2f333b;"><span>1.0</span></div><div class="real-val-btn" style="margin-left:4px;">v</div></div><div class="real-row"><span class="real-label">Comparison:</span><div class="real-input-dropdown">Greater</div></div><div class="real-row"><span class="real-label">Axis:</span><div class="real-input-dropdown">All</div></div><div class="real-row"><span class="real-label">Scope:</span><div class="real-input-dropdown">Local</div></div><div class="real-row"><span class="real-label" style="width: auto; padding-right:8px;">Prefix:</span><div class="real-input" style="justify-content:space-between; padding:4px 8px;"><span>movement</span><div class="real-input-dropdown-btn" style="padding:2px 6px;">v</div></div></div><div class="real-inline-row" style="margin-top:4px;"><div class="real-inline-btn" style="background:#2f343d;">Expose</div><div class="real-inline-btn" style="background:#2f343d;">Verbose</div><div class="real-inline-btn">Invert</div></div></div>
            </div>
        </div>
    </div>

Properties

Property

Type

Default

Notes

Detection

option

Velocity

What to detect

Threshold

float

1.0

Minimum value to trigger

Comparison

option

Greater

How to compare

Axis

option

All

Movement axis or plane to evaluate

Expose

bool

False

Write movement sample data into variables

Scope

option

Local

Where exposed movement variables are written

Velocity Var

variable_name

Variable that receives filtered velocity

Speed Var

variable_name

Variable that receives filtered speed

Accel Var

variable_name

Variable that receives filtered acceleration

Accel Mag Var

variable_name

Variable that receives acceleration magnitude

Value Var

variable_name

Variable that receives the compared sample value

Active Var

variable_name

Variable that receives whether the movement condition is active

Prefix

string

movement

Compatibility fallback when explicit output variables are empty

Invert

bool

False

Trigger when the movement condition is not met

Verbose

bool

False

Log movement listener samples via ladybug