thedivergentai/gd-agentic-skills/godot-adapt-2d-to-3d
Claude Code and agent skill by thedivergentai/gd-agentic-skills
- community
Checking that the SKILL.md file is still in the repository.
Expert patterns for migrating 2D games to 3D including node type conversions, camera systems (third-person, first-person, orbit), physics layer migration, sprite-to-model art pipeline, and control scheme adaptations. Use when porting 2D projects to 3D or adding 3D elements. Trigger keywords: CharacterBody2D to CharacterBody3D, Area2D to Area3D, Camera2D to Camera3D, Vector2 to Vector3, collision_layer migration, sprite to MeshInstance3D, 2D to 3D conversion.
Install
npx vskill@latest install thedivergentai/gd-agentic-skills/godot-adapt-2d-to-3dSKILL.md
The same SKILL.md was published earlier as thedivergentai/gd-agentic-skills/godot-adapt-2d-to-3d.
NEVER Do
- NEVER directly replace Vector2 with Vector3(x, y, 0) — This creates a "flat 3D" game with no depth gameplay. Add Z-axis movement or camera rotation to justify 3D.
- NEVER keep 2D collision layers — 2D and 3D physics use separate layer systems. You must reconfigure collision_layer/collision_mask for 3D nodes.
- NEVER forget to add lighting — 3D without lights is pitch black (unless using unlit materials). Add at least one DirectionalLight3D.
- NEVER use Camera2D follow logic in 3D — Camera3D needs spring arm or look-at logic. Direct position copying causes clipping and disorientation.
- NEVER assume same performance — 3D is 5-10x more demanding. Budget for lower draw calls, smaller viewport resolution on mobile.
- NEVER use the rotation property for complex 3D logic — 3D rotation uses Euler angles. Interpolating Euler angles causes unpredictable paths and Gimbal Lock. Always use
Quaternionfor 3D rotation interpolation or theBasismatrix for directional vectors. - NEVER ignore metric scaling — 3D physics and lighting assume 1 unit = 1 meter. Scaling models inside the engine introduces precision errors. Export assets from DCCs at the correct metric scale.
- NEVER disable physics interpolation when using custom camera follow scripts — Updating camera position in
_processto follow a body moving in_physics_processcauses jitter. UseNode3D.get_global_transform_interpolated()for smooth transforms.
Available Scripts
MANDATORY: Load migration scripts before pasting camera/movement recipes.
spring_arm_camera_setup.gd
MANDATORY third-person SpringArm3D + Camera3D. Do not parent Camera3D bare to the body.
characterbody3d_migration_movement.gd
MANDATORY camera-relative CharacterBody3D movement for 2D→3D ports.
physics_layer_migration_checklist.gd
MANDATORY checklist: 3D Physics layer names are separate from 2D — mirror names, then apply bits.
sprite_plane.gd
Sprite3D billboard configuration and world-to-screen projection for placing 2D UI over 3D objects.
vector_mapping.gd
Vector2↔Vector3 mapping helpers (Y-up vs Z-forward pitfalls).
crisp_projected_ui.gd
Diegetic / projected UI sharpness patterns.
adapt_2d_to_3d_patterns.gd
Billboards, mouse→3D rays, CanvasLayer overlay helpers.
navigation_bridge_2d5d.gd
Projects NavigationServer3D paths to 2D screen/gameplay plane for 2.5D sprite actors.
massive_crowd_manager.gd
MultiMesh + billboard shader crowd (GPU orientation; not per-node Sprite3D).
Do NOT Load lighting deep-dives here — route to godot-3d-lighting. Add a DirectionalLight3D + ambient only; GI/cascades live there.
Node Conversion Matrix
| 2D Node | 3D Equivalent | Notes | |
|---|---|---|---|
| CharacterBody2D | CharacterBody3D | MANDATORY characterbody3d_migration_movement.gd | |
| RigidBody2D | RigidBody3D | Gravity Vector3(0, -9.8, 0) | |
| StaticBody2D | StaticBody3D | Shape3D resources (no auto-convert) | |
| Area2D | Area3D | Same trigger idea; new layers | |
| Sprite2D | MeshInstance3D / Sprite3D | Billboard vs mesh art choice | |
| Camera2D | Camera3D | MANDATORY spring_arm_camera_setup.gd | |
| CollisionShape2D | CollisionShape3D | Re-author shapes | |
| RayCast2D | RayCast3D | target_position is Vector3 |
Migration Steps (script-first)
- Physics layers — MANDATORY `physics_layer_migration_checklist.gd`. Project Settings → Layer Names → 3D Physics.
- Camera — MANDATORY `spring_arm_camera_setup.gd`. Never copy Camera2D follow onto Camera3D.
- Movement — MANDATORY `characterbody3d_migration_movement.gd`. Camera-relative XZ; jump on Y.
Art Pipeline: Sprites → 3D Models
Option 1: Billboard Sprites (2.5D)
Option 2: Quad Meshes (Floating Sprites)
Option 3: Full 3D Models (Blender/Asset Library)
Lighting Considerations
Minimum: one DirectionalLight3D + WorldEnvironment ambient so the scene is not black. Do NOT Load cascade/GI/bake tutorials in this skill — godot-3d-lighting.
UI Adaptation
Performance Budgeting (profiler gates)
Speculative "2D vs 3D budget" tables lie. Gate on measured data:
- Open Profiler / Debugger → Monitors after the port runs on target hardware.
- Draw calls / primitives — if MeshInstance count explodes, add Mesh LOD / Visibility Ranges before guessing vertex caps.
- Shadow cost — lower
directional_shadow_max_distanceand shadowed Omni/Spot count until frame time recovers (tune in godot-3d-lighting). - LOD procedure — set
visibility_range_*on distant GeometryInstance3D; unlit/simplified materials past the near band. - Fail gate — ship only when 95th-percentile frame time meets the platform target (e.g. ≤16.6 ms for 60 FPS), not when a spreadsheet says "50–100 draw calls".
Input Scheme Changes
2D → 3D Input Mapping
Edge Cases
Physics Not Working
Camera Clipping Through Walls
Use MANDATORY `spring_arm_camera_setup.gd` — set spring_arm.collision_mask to the World layer so the boom retracts instead of clipping.
Player Falling Through Floor
Decision Tree: When to Go 3D
| Factor | Stay 2D | Go 3D | |
|---|---|---|---|
| Gameplay | Platformer, top-down, no depth needed | Exploration, first-person, 3D space combat | |
| Art budget | Pixel art, limited resources | 3D models available or necessary | |
| Performance target | Mobile, web, low-end | Desktop, console, high-end mobile | |
| Development time | Limited | Have time for 3D learning curve | |
| Team skills | 2D artists only | 3D artists or asset library |
Expert Techniques & Optimizations
1. Vector Math over Euler Angles
When moving a 3D character, rely heavily on Transform3D basis vectors rather than calculating trigonometric angles. To move forward locally, extract the negative Z-axis of your transform's basis: velocity = transform.basis.z * speed.
2. Understanding Coordinate Discrepancies
In 2D, the Y-axis points down. In 3D, Godot uses a right-handed system where Y-axis points UP, and forward is -Z. Translating 2D jumps to 3D requires inverting the Y velocity logic (e.g., velocity.y = JUMP_SPEED instead of -JUMP_SPEED).
3. 2.5D Navigation (Camera-Projected Paths)
For 2.5D games where actors move on a 3D floor but are displayed as 2D sprites, query the NavigationServer3D directly and project the resulting PackedVector3Array into 2D screen space (or a flattened gameplay plane) using Camera3D.unproject_position.
4. Shader-Based Billboarding (Massive Crowd Rendering)
To render millions of instances, use MultiMeshInstance3D paired with a custom Visual Shader. Use VisualShaderNodeBillboard with BILLBOARD_TYPE_FIXED_Y to ensure sprites stay upright on flat terrain.
5. Lighting Migration
PointLight2D→OmniLight3D conversion is one-shot editor work — keep a project tool if needed. Ongoing lighting quality belongs in godot-3d-lighting.
Deep recipes (on demand)
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/godot-adapt-2d-to-3d/SKILL.md
Popularity
- Repository stars
- 757
- Repository forks
- 45
- 7-day trend score
- 33
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 16 Mar 2026, 8 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/thedivergentai/gd-agentic-skills/godot-adapt-2d-to-3d)