Set 3D Dungeon Enabled
Category: Map/World
An Event Content that switches map display between a 2D top-down view and a 3D first-person dungeon view. Use when you want to use both 2D and 3D presentations of the same map data, such as "switch to 3D mode at the dungeon entrance", "change view with magic", or "return to 2D in the boss room".
Use with Change Map as the basic combination
If you place this Event Content consecutively with Change Map or Set 3D Dungeon Config, the tool automatically performs an "atomic switch during fade-out" (standalone use results in an instantaneous switch). When switching map and 3D mode simultaneously, be sure to place them consecutively.
Prior 3D dungeon basic setup required
Before using this Event Content, you must complete basic settings such as wall / floor / ceiling textures and view distance in Editor - 3D Mode Settings. Insufficient settings may cause the 3D display to break or go completely dark.
Property List
| Item | Input format | Description |
|---|---|---|
| 3D Mode Enabled | Checkbox | ON=3D mode / OFF=2D mode |
This Event Content has only one property and is very simple.
Property Details
3D Mode Enabled
Specify whether to switch the map display to 3D first-person view mode.
- ON (checked): 3D first-person view mode
- OFF (unchecked): Conventional 2D top-down view mode
- Default: OFF
Detailed appearance settings are on the Config side
Detailed settings such as wall and floor textures, ceiling toggle, background color, and view distance are not handled by this Event Content. Those are set in Set 3D Dungeon Config.
Runtime Behavior
Standalone use (instant switch)
If you call this Event Content standalone, 2D ↔ 3D is switched instantly with no fade or other effects:
- Batch detection: If no adjacent Change Map or Set 3D Dungeon Config is present, treated as standalone
- Flag update:
save_data.world.dungeon_3d_enabled = true/false - Display switch: Visibility of 3D space nodes is toggled
- 3D space reconstruction: When enabled, builds walls / floor / ceiling via rebuild()
- 2D display sync: Visibility of World3DDisplay (TextureRect) is synced
- Proceed to next Event Content
Batch use (atomic switch, with fade)
When this Event Content is placed consecutively with Change Map or Set 3D Dungeon Config, the tool executes atomic processing:
- Detect consecutive range: Identify the range where the three target types (Change Map / Set 3D Dungeon Enabled / Set 3D Dungeon Config) are consecutive immediately after
- Start transition: If Change Map is included, cover the screen with a transition such as
bi_transition_map_change(fade_out) - Atomic processing during fade:
- Apply 3D settings changes (Enabled / Config) to state in order
- Sync World3DDisplay.visible
- If Change Map is included, switch maps via
world.change_map()
- End transition: Restore screen with fade_in
- Proceed to next Event Content: Fires once after all Event Contents in the batch complete
Thanks to this batch processing, "entering a dungeon → moving to a new map while switching to 3D mode" can be achieved with smooth presentation.
Behavior during 3D mode
When 3D mode is ON, the following behaviors change:
- PC sprite is forcibly hidden: Since it's a first-person view, PC is not displayed on the 2D screen (see Set PC Visible for details)
- Input remapping:
- Up = Move forward (advance 1 cell)
- Left = Rotate 90° left
- Right = Rotate 90° right
- Down = Rotate 180°
- Minimap continues to be 2D top-down: You can still track position in 3D
- Move Camera is disabled: Move Camera is completely skipped during 3D mode
Persistence to save data
The ON/OFF state of 3D mode is saved to save data as save_data.world.dungeon_3d_enabled. Save → load resumes with the same mode.
Typical Usage Flows
Flow 1: 3D switch at dungeon entrance (atomic batch recommended)
Move from the dungeon entrance in town to the 3D-mode dungeon body:
- (Inside the dungeon entrance object event)
- Change Map: Move to the dungeon body map
- Set 3D Dungeon Config: Set wall / floor / ceiling textures
- Set 3D Dungeon Enabled (this Event Content)
- 3D Mode Enabled: ON
If the three above are placed consecutively, the tool processes them atomically, resulting in a smooth switch with fade.
Flow 2: Return to 2D for boss room
Return to 2D for a boss battle at the deepest part of a 3D dungeon:
- (Inside boss room arrival event)
- Set 3D Dungeon Enabled (this Event Content)
- 3D Mode Enabled: OFF
- Show Text: "My view opens up..."
- Start Battle: Boss battle
Flow 3: View change via magic
Temporarily switch to 3D view via a magic item effect:
- (Inside item use event)
- Play Sound: Magic activation sound
- Set 3D Dungeon Enabled (this Event Content)
- 3D Mode Enabled: ON
- Show Text: "My viewpoint has changed!"
- (Exploration event)
- Set 3D Dungeon Enabled (this Event Content): Return to original
- 3D Mode Enabled: OFF
Flow 4: Switching between multiple dungeons
Moving from dungeon A to dungeon B (atomic batch):
- Change Map: To dungeon B
- Set 3D Dungeon Config: Switch to textures for B
- Set 3D Dungeon Enabled (this Event Content): Continue 3D
- 3D Mode Enabled: ON
Typical Combinations
- Change Map: Switch 3D mode simultaneously with map switch (atomic batch recommended)
- Set 3D Dungeon Config: Texture and environment settings (atomic batch recommended)
- Reset 3D Dungeon Regions: Reset per-region settings
- Set PC Visible: Manage PC display in 2D mode
- Move Camera: Disabled during 3D mode (skipped)
- Fade Out / Fade In: Manually add presentation on standalone use
- Play Sound: Sound effect at the moment of switching
Related Events
- Set 3D Dungeon Config: Detailed settings (textures, view distance, ceiling, background)
- Reset 3D Dungeon Regions: Clear all per-region settings
- Change Map: Atomic batch cooperation with map switching
- Set PC Visible: PC is forcibly hidden during 3D mode
- Move Camera: Disabled during 3D mode
Related Pages
- Editor - 3D Mode Settings — Basic 3D dungeon settings
- 3D Dungeon Mode — Complete reference for 3D features (to be written)
Notes and Constraints
Prior 3D dungeon settings required
Even when you enable 3D mode with this Event Content, the display will not be correct unless you have configured the following in Editor - 3D Mode Settings:
- Wall and floor textures (
wall_texture/floor_texture) - View distance (
view_distance) - Ceiling and background settings (optional)
These can be shared basic settings for all maps, or configured per map / per region. If the 3D display is completely dark, first check the basic settings.
Instant switch on standalone use
Calling this Event Content standalone results in an instant switch with no transition (fade). To "switch smoothly during fade", be sure to place it consecutively with Change Map or Set 3D Dungeon Config. If you want fade even on standalone use, manually insert Fade Out Screen / Fade In Screen before and after this Event Content.
Constraints during 3D mode
The following constraints apply during 3D mode:
- PC sprite is forcibly hidden (because it's first-person)
- Move Camera is disabled (skipped)
- Input is remapped (forward / rotation method)
- Dash (run) feature is disabled (always advance by move_time)
Design your 3D-mode events with these as premises.
Batch processing specification on consecutive placement
When this Event Content and Change Map / Set 3D Dungeon Config are placed consecutively, they become an atomic batch. In this case:
- The consecutive range must be "directly adjacent"; if another Event Content is inserted in between, it is split
- Only "two or more consecutive" are treated as a batch (standalone 1 goes through the traditional path)
- Change Map's transition takes priority (if a Change Map is in the batch, fade is applied; otherwise, no fade)
- If there are multiple Set 3D Dungeon Config entries in the batch, they are applied in order
Load when switching 2D ↔ 3D
Enabling 3D mode starts Godot's 3D rendering features. On older devices, this may affect performance. The load varies greatly depending on map size and view distance settings, so if performance is heavy, consider shortening the view distance.
Saved in save data
The 3D mode state is saved to save data, so if you "save in 3D mode → load later", it resumes in 3D mode. If you want "the appearance after load to be 2D", design the event flow with load in mind by explicitly returning to 2D.
