> ## Documentation Index
> Fetch the complete documentation index at: https://docs.summerengine.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Painted_door (Painted 25d world skill)

> painted_door.gd from the Painted 25d world skill in the Summer Engine skill library. Build a 2D or 2.5D game as a painted world: a 3D blockout under one fixed camera, an AI paint-over projected onto it, sprite characters.

> [!NOTE]
>
> Part of the [`painted-25d-world` skill](/skills/painted-25d-world). The skill links here when your agent needs the detail.

```gdscript painted_door.gd theme={null}
extends Area3D
## A door between painted locations. When the player walks in, the world moves them into `to` at `spawn`.
## Put `spawn` (a Marker3D) inside the target room or outside the target door, clear of that room's own door
## trigger, or the player bounces straight back.

@export var to: NodePath
@export var spawn: NodePath

func _ready() -> void:
	body_entered.connect(_on_body_entered)

func _on_body_entered(body: Node) -> void:
	var world := get_parent()
	while world != null and not world.has_method("go"):
		world = world.get_parent()
	if world != null and body == world.player:
		world.go(get_node(to), (get_node(spawn) as Node3D).global_position)
```

***

Source: [`library/skills/painted-25d-world/_building-blocks/painted_door.gd`](https://github.com/SummerEngine/summer/blob/main/library/skills/painted-25d-world/_building-blocks/painted_door.gd), rendered from `summer-engine@4.5.0` on npm.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.