Skip to reading
GDScript Programming & Godot

Gameplay: Characters, movement and animation

Edition 0.86.4.1 HF1

0.86.4.1 Hotfix 1 edition. Earlier lessons and screenshots retain their original version context; revised references and supplements describe the newer behavior.

Download PDFView PDF page

Movement commands act on characters that the runtime can resolve. A destination can be a target record or coordinates. The room picker helps resolve that destination; it is not a promise that the character will walk through unloaded rooms.

CharacterWalkTo()#

Character Walk To

Walk a character to the chosen target or position, waiting for the movement call.

Source table from Gameplay: Characters, movement and animation, page 111
Option key / fieldMeaning and inputDefault
Character characterIdChoose a Character Designer ID; player is a runtime alias where supported.Blank
Object Room sceneIdChoose a scene ID.Blank
Object (optional) targetIdChoose an entity in the selected scene. May be blank.Blank
XYZ positionDestination/placement coordinates as [X, Y, Z].[0.0, 0.0, 0.0]
Walking Animation animationChoose a clip/state available to that entity. May be blank.Blank
Speed speedMovement speed; 0 uses the normal movement speed where supported.0

Timing. Waits for the movement routine.

Code example
await CharacterWalkTo({"characterId": "player", "sceneId": "lab", "targetId": "archive_door"})

In use. Walk Elias to an approach marker beside the workbench. Use a reachable marker instead of the middle of a solid door. The current action bridge uses the character's movement logic; the Animation field is not a reliable override for its walk-state setup.

Page 111 of 378Permalink
Go to page