Getting started
Install the addon, make sure your player can set off triggers, and build a proximity door that opens when the player walks up to it.
1. Install the addon
- Download the repository from GitHub (Code > Download ZIP) and unzip it.
- Copy the
addons/godot_logic_nodes/folder into your project'saddons/folder. Createaddons/if your project doesn't have one yet. - In Godot, open Project > Project Settings > Plugins and tick Enable next to Godot Logic Nodes.
When the plugin is enabled:
- A Logic I/O tab appears in the bottom panel, next to Output and Debugger.
- Logic Nodes appear in the Add Child Node dialog. Search for "Logic".
- The addon adds the input actions its nodes and demo player use to Project Settings > Input Map. Actions your project already has are left as they are.
| Action | Default key | Used by |
|---|---|---|
gln_interact | E | Interact Zone |
gln_move_forward | W | The demo first-person player |
gln_move_back | S | The demo first-person player |
gln_move_left | A | The demo first-person player |
gln_move_right | D | The demo first-person player |
Everything the addon names starts with gln_, so it won't clash with actions or groups already in your project.
2. Set up your player
Trigger Volumes and Interact Zones only react to physics bodies that are in a particular group. Out of the box that group is gln_player. Your player needs three things:
- A physics body. A
CharacterBody3Dwith aCollisionShape3Dis the usual choice. - The right physics layer. The body must be on a layer the trigger's Collision Mask includes. Both default to layer 1, so this usually just works.
- The group. Select the player, open the Node > Groups tab next to the Inspector, type
gln_playerand click Add.
The addon ships with one. Drag addons/godot_logic_nodes/scripts/fpvPlayerController/FirstPersonController.tscn into your scene. It's already in the gln_player group: WASD to walk, mouse to look, Esc to free the mouse.
3. Build your first door
A proximity door opens when the player walks up to it and closes when they walk away. You need the door itself, one Move node to slide it, and one Trigger Volume to notice the player.
- Add a Move node. Select the node your level lives under, press Ctrl+A (Add Child Node), search for LogicMove and add it. New Logic Nodes appear in front of the editor camera, so look where you're pointing.
- Put the door under it. In the Scene tree, drag your door mesh onto the Move node so it becomes its child. Anything under a Move node moves with it. (Or leave the door where it is and pick it in the Move node's Target setting.)
- Set where it goes. In the Inspector, set Move Offset to how far the door should slide, for example
(2, 0, 0)for 2 meters along X. A cyan line in the viewport shows the path. Leave Mode on Once. - Add a Trigger Volume. Add a LogicTrigger node in front of the door. The transparent orange box is the area it watches. Change Size so the box covers the space in front of the door.
- Wire the trigger to the door. With the Trigger Volume selected, open the Logic I/O tab at the bottom. Click + Add Output twice and fill in the two rows:
| My Output | Target | Target Input |
|---|---|---|
| On Trigger Enter | the Move node | Go To End |
| On Trigger Exit | the Move node | Go To Start |
- Press play. Walk into the box and the door slides open. Walk out and it slides shut.
Two thin wires now run from the Trigger Volume to the Move node in the viewport. Select either node and they turn thick and pulse toward the door, so you can see which way the signal flows.
Start means "head for the other end", and it's ignored while the door is still moving. If the player steps in and straight back out, the second Start is lost and the door stays open. Go To End and Go To Start always mean the same thing and turn the door around mid-move, so it always ends up where it should. Use them whenever a pair of events like enter/exit drives something.
Demo scenes
The addon includes scenes you can open, play and take apart:
| Scene | What's in it |
|---|---|
scenes/Sandbox.tscn | A labeled example of every node, plus working setups: a spinning fan, a moving light, a proximity door, an interact door, an elevator and a three-zone combination gate. |
scenes/BenchmarkScene.tscn | An empty room with a door frame, two door halves and a player. Nothing is wired. It's the test task given to playtesters: make the door open and close. |
scenes/StressTest.tscn | 93 Logic Nodes running at once, with an on-screen monitor. Used to check performance. |
All paths are under addons/godot_logic_nodes/. The models/ folder also has ready-made pieces: a sliding door, a door frame, an interactable button and a feedback panel.
Next, read How it works to understand what you just built, or jump to Recipes for more setups.