Servo

Category: Executor Tier: Plus

Purpose

Applies steering behaviors to a 2D or 3D host: Seek, Flee, Pursue, Evade, Arrive, and Wander.

Visual Reference

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

When To Use

  • Simple enemy chase/flee logic.

  • Predictive pursue/evade without helper scripts.

  • Lightweight wander/arrive behavior on CharacterBody or RigidBody hosts.

  • 2D enemies that need to respect NavigationRegion2D corridors and corners.

Runtime Behavior

  • Resolves the live target each tick.

  • Falls back to Local/Global variable lookup when direct node lookup fails.

  • Variable-backed targets may be live node references, paths, or exposed transform vectors such as {prefix}_position.

  • Computes a desired velocity for the selected behavior.

  • In Direct Steering, applies steering force or direct velocity depending on physics_mode.

  • In NavMesh 2D, uses NavigationAgent2D.get_next_path_position() to drive the next desired movement vector and follow navigable corners/boundaries.

  • In 2D, rotates the host to face the desired movement direction so flee/evade turn away immediately instead of visually backpedaling during reversal.

Generated UI Mockup — showing expanded properties
Servo
-
x
Name:
Label this brick...
Behavior:
Seek
Move Mode:
Direct Steering
Target:
v
Nav Agent:
v
Physics Mode:
Force
Forward:
+X
Facing Prefix:
servo
v
Facing Scope:
Local
Path Dist
8.0
v
Goal Dist
12.0
v
Max Spd
5.0
v
Max Frc
2.0
v
Arr. Rad
2.0
v
Slow Rad
5.0
v
Wnd Rad
3.0
v
Wnd Dist
5.0
v
Wnd Jit
1.0
v
Pred Time
1.0
v
Expose Facing
Verbose

Properties

Property

Type

Default

Notes

Behavior

option

Seek

Shared AI surface. Direct steering works in 2D and 3D. NavMesh 2D is an explicit 2D-only movement mode.

Move Mode

option

Direct Steering

Direct Steering works in 2D and 3D. NavMesh 2D uses NavigationAgent2D on 2D hosts.

Target

string

Node name/path or variable containing a live node reference, path, or Vector2/Vector3 position to seek/flee/pursue/evade/arrive toward

Nav Agent

string

[NavMesh 2D] Optional NavigationAgent2D node path/name. Leave empty to auto-find a child agent.

Path Dist

float

8.0

[NavMesh 2D] Distance from the path point before advancing to the next point

Goal Dist

float

12.0

[NavMesh 2D] Distance from the goal before navigation is considered complete

Max Spd

float

5.0

Max movement speed (world units/s — for 2D pixel games use ~100–300)

Max Frc

float

2.0

Max steering force clamp

Arr. Rad

float

2.0

[Arrive] Full stop within this distance (2D: use 10–50px; 3D: ~0.5–2m)

Slow Rad

float

5.0

[Arrive] Begin slowing at this distance (2D: use 50–150px; 3D: ~2–10m)

Wnd Rad

float

3.0

[Wander] Radius of wander circle

Wnd Dist

float

5.0

[Wander] Distance ahead to project wander circle

Wnd Jit

float

1.0

[Wander] Random angle displacement per tick

Pred Time

float

1.0

[Pursue/Evade] Seconds ahead to predict target position

Physics Mode

option

Force

Force=apply_central_force (RigidBody only); Velocity=set velocity (RigidBody or CharacterBody)

Forward

option

+X

Which local axis points ‘forward’. Default +X (legacy). Top-down games typically want -Y.

Expose Facing

bool

False

Write 4-way and 8-way cardinal direction (N/NE/E/SE/S/SW/W/NW) plus facing_vector to a variable namespace, for sprite animation swap.

Facing Prefix

string

servo

Variable namespace for exposed facing. Writes {prefix}_direction_4way, {prefix}_direction_8way, {prefix}_facing_vector.

Facing Scope

option

Local

Where to write the exposed facing variables.

Verbose

bool

False

Log steering behavior, target, and velocity each tick (controlled by ladybug button)