godot-3d-gameplay
Skill54 starsChanged 14 days agoMITView on GitHub
Building 3D games in Godot 4.7 - third-person and orbit cameras (SpringArm3D), camera-relative movement, lock-on, top-down/RTS/isometric cameras, GridMap + MeshLibrary levels, CSG blockout and baking, modular kit import hints, Path3D rails, interactables, spawners, world-space UI, large worlds and LOD. Use for 3D player controllers, cameras or level building.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- pbzona/godot-skillstheir own version, first seen Oct 20, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- pbzona/godot-skills★ 2same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository28 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- godot-2dSkill
- godot-3d-renderingSkill
- godot-addonsSkill
- godot-animationSkill
- godot-architectureSkill
- godot-audioSkill
- godot-coreSkill
- godot-csharpSkill
- godot-editor-toolingSkill
- godot-export-ciSkill
- godot-game-feelSkill
- godot-gdscriptSkill
- godot-inputSkill
- godot-migrationSkill
- godot-mobile-webSkill
- godot-modding-dlcSkill
- godot-narrativeSkill
- godot-navigation-aiSkill
- godot-networkingSkill
- godot-performanceSkill
- godot-physicsSkill
- godot-proceduralSkill
- godot-shaders-vfxSkill
- godot-testing-debugSkill
- godot-uiSkill
- godot-xrSkill
The file
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 28
Keep gameplay in the root script and expose @export tuning (speed, acceleration, jump, sensitivity).
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
3D Gameplay (4.7)
This skill covers how a 3D game plays: controllers, cameras, levels. Rendering is godot-3d-rendering, bodies and raycasts are godot-physics (it has the first-person controller), animation blending is godot-animation.
Scene layout that scales
Player (CharacterBody3D) # movement, script
├─ CollisionShape3D (capsule)
├─ Model (Node3D) # rotate this to face movement, not the body
│ └─ character.glb (AnimationTree lives here)
└─ CameraRig (Node3D, top_level) # follows the player in _process, owns the yaw
└─ Pitch (Node3D)
└─ SpringArm3D # camera collision
└─ Camera3Dtop_level = trueon the rig keeps the camera from inheriting the body's rotation and physics jitter. Followplayer.get_global_transform_interpolated()when physics interpolation is on.- Turn the Model, not the body, so the collider and camera stay stable. Rotate with
lerp_angleorBasis.slerp. - Keep gameplay in the root script and expose
@exporttuning (speed, acceleration, jump, sensitivity).
Camera-relative movement (third person)
input := Input.get_vector("move_left", "move_right", "move_forward", "move_back") then dir := (camera_yaw_basis * Vector3(input.x, 0, input.y)).normalized(). Use the rig's yaw basis only (no pitch) so looking down doesn't slow you. Accelerate with move_toward for grip, lerp toward zero for slide.
Cameras
| Style | Recipe |
| Third-person orbit | yaw on the rig, pitch on a child (clamp −70°..60°), SpringArm3D (spring_length, margin, sphere shape radius 0.2–0.3) |
| Over-the-shoulder aim | tween the spring length and Camera3D.h_offset, lower fov |
| Lock-on | the rig looks at the midpoint of the player and target; the player strafes facing the target |
| Top-down / ARPG | fixed pitch −50..−60°, smooth follow, mouse picking for aiming (see godot-physics) |
| Isometric / tactics | projection = PROJECTION_ORTHOGONAL, size = zoom, rotate 45° yaw, ~−35° pitch |
| RTS | the rig moves on XZ (WASD, edge pan), the wheel changes height or size, clamp to map bounds |
| Rail / cinematic | PathFollow3D on a Path3D with progress driven by a tween or AnimationPlayer |
SpringArm3Dmust not hit the player: exclude it withadd_excluded_object(player.get_rid())or leave the player layer out ofcollision_mask.- Mouse look in
_unhandled_input(InputEventMouseMotion.relative), stick look in_process(multiply bydelta). Don't mix them in one place. - Several cameras: call
make_current()on the one you want. Blending between cameras needs a tween of one camera's transform (or the Phantom Camera addon). - Screen shake and FOV kicks:
godot-game-feel.
Levels
GridMap (modular 3D tiles):
- Build a scene with one
MeshInstance3Dper tile, each with aStaticBody3D+CollisionShape3Dchild (and an optionalNavigationRegion3D). Then use Scene → Export As → MeshLibrary. The 4.7 MeshLibrary editor (bottom panel) edits items, previews and undo. GridMap.mesh_library,cell_size= tile size, and thecell_center_*flags to match pivots.- Code:
set_cell_item(Vector3i, item, orientation)withorientation = get_orthogonal_index_from_basis(basis),get_cell_item,get_used_cells_by_item,local_to_map/map_to_local. - Navigation:
bake_navigation = trueuses the item navmeshes, or bake aNavigationRegion3Dover the GridMap (godot-navigation-ai). CSG (CSGBox3D,CSGCombiner3D,CSGPolygon3D,operation = union/subtraction/intersection) is for blockout and prototypes. It's slow to rebuild at runtime. For shipping, callbake_static_mesh()+bake_collision_shape()(or the editor's CSG → Bake Mesh / Collision).use_collisionon the root only. 4.7 addsautosmooth/smoothing_angle. Modular kits from Blender (.glb): name suffixes create nodes on import:-col(mesh + static collision),-colonly(collision only),-convcolonly(convex),-navmesh,-rigid,-noimp(skip). Prefer-colonlyboxes over trimesh colliders for performance.
Gameplay objects
- Interactables: an
interact(actor)method plus groupinteractable. Find them with aShapeCast3DorRayCast3Dfrom the camera (godot-physicshas the prompt code). Show aLabel3Dor a screen-space prompt. - Pickups/triggers:
Area3D(body_entered), with masks set so only the player layer triggers them. - Doors, lifts, moving platforms:
AnimatableBody3Dmoved by AnimationPlayer/tween orPathFollow3Dso riders get carried. - Spawners:
Marker3Dpoints,PackedScene.instantiate(), thenadd_childto a level container before settingglobal_position, or setpositionrelative to the container. Pool bullets and debris (godot-performance). - Checkpoints/respawn: store a
Transform3D, teleport withreset_physics_interpolation(). - World-space UI:
Label3D/Sprite3Dwithbillboard, or 2D UI positioned withcamera.unproject_position(p)(hide whencamera.is_position_behind(p)). - Vehicles:
VehicleBody3D+VehicleWheel3D(arcade cars), or a RigidBody3D with raycast suspension for more control.
Big worlds
- Visibility ranges (
GeometryInstance3D.visibility_range_begin/end+ fade) for HLOD;OccluderInstance3Dfor indoor culling; automatic mesh LOD is on by default for imported meshes. - Precision: past ~10 km from the origin, jitter appears. Either shift the world origin (move everything back when the player passes a threshold) or use a double-precision engine build.
- Stream areas with
ResourceLoader.load_threaded_request()(godot-performance). Terrain: the Terrain3D addon (1.1, Godot 4.5+) or a heightmap mesh withHeightMapShape3D(godot-procedural).
Third-person controller and camera rig, lock-on, top-down aiming, RTS camera, GridMap painting, CSG baking, rail camera and health bars (compiled by the tests): references/patterns.md
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

