thedivergentai/godot-physics-3d
Expert patterns for Godot 3D physics (Jolt/PhysX), including Ragdolls, PhysicalBones, Joint3D constraints, RayCasting optimizations, and collision layers. Use for rigid body simulations, character physics, or complex interactions. Trigger keywords: RigidBody3D, PhysicalBone3D, Jolt, Ragdoll, Skeleton3D, Joint3D, PinJoint3D, HingeJoint3D, Generic6DOFJoint3D, RayCast3D, PhysicsDirectSpaceState3D.
npx skills add https://github.com/thedivergentai/GD-Agentic-Skills --skill godot-physics-3d
High-performance 3D simulation: body choice, CCD, stairs, vehicles, ragdolls, SoftBody — routed through scripts.
PhysicsBody3D nodes in _process() — Use _physics_process(). Moving bodies outside the physics step causes visual jitter and unreliable collision detection [12, 13].shape properties (height, radius, size) instead.RigidBody3D transforms directly — This ignores the physics solver. Use apply_impulse(), apply_torque(), or the _integrate_forces() callback for safe manipulation [17].RigidBody3D for platformer player controllers — RigidBody is for objects driven by physics. For refined movement, use CharacterBody3D with move_and_slide() [move_and_slide].PhysicsServer3D RIDs without manual cleanup — RIDs are not garbage collected. If you create bodies via the server, you MUST call free_rid() when done to avoid memory leaks.RayCast3D for precise ground detection on stairs — A single ray is too thin. Use ShapeCast3D with a cylinder or sphere shape to detect walkable steps reliably [Stair Logic].VehicleBody3D for non-racing arcade vehicles — It's a complex sim. For arcade hovercraft or simple cars, a custom CharacterBody3D with Raycasts is often easier to tune.collision_layer and collision_mask properly — If everything is on layer 1, performance will tank from redundant checks. Categorize your world.Area3D for high-frequency blocking — Areas are for detection. For walls/barriers, use StaticBody3D to ensure immediate, robust containment.plane.d sign convention flipped vs 4.6 — flip sign to match prior behavior.linear_stiffness and damping_coefficient.> MANDATORY — load the script for the chosen row before writing movement or sim code.
>
> Do NOT Load every physics script for one controller.
| Need / symptom | Body / API | Script |
|----------------|------------|--------|
| Player locomotion, stairs, slopes | CharacterBody3D | MANDATORY kinematic_3d_stairs_logic.gd + shapecast_3d_ground_check.gd |
| Debris, props, impulse-driven objects | RigidBody3D | NEVER + impulses; layers via physics_layers_3d_config.gd |
| Racing / wheeled sim | VehicleBody3D | MANDATORY vehicle_simulation_tuning.gd |
| Arcade hover / simple cars | Custom CharacterBody3D + rays | Prefer stairs/ray scripts; avoid full VehicleBody |
| Death / blend to physics pose | PhysicalBone3D / Skeleton | MANDATORY ragdoll_manager.gd |
| Cloaks, soft cloth, foliage soft | SoftBody3D | MANDATORY soft_body_3d_interaction.gd |
| Tunneling bullets | CCD / server bullets | MANDATORY physics_ccd_3d_projectile.gd or physics_server_3d_bullets.gd |
| Joint snap / destructibles | Joint3D stress | joint_3d_breakage_logic.gd |
| Gravity wells / zero-G | Area priority | custom_gravity_well_3d.gd |
| LOS / AI vision | Direct space state | ray_query_3d_vision.gd |
| Debug hit normals | visualizer | raycast_visualizer.gd |
plane.d sign flipped under Jolt vs 4.6 — flip when migrating.Procedural stair-step + snap for CharacterBody3D.
Volume ground/stair detection (rays tunnel).
Animation → PhysicalBone simulation transition, impulses, cleanup.
VehicleBody3D / VehicleWheel3D arcade vs sim knobs.
SoftBody3D flags and attachments after 4.7 mass defaults.
CCD / sub-step anti-tunneling for small fast bodies.
RID bullets at scale with mandatory free_rid().
Named 3D collision matrix architecture.
Planet / zero-G Area3D gravity priority.
Joint stress monitoring and procedural snaps.
Low-level LOS / AI vision queries.
In-game ray hit/normal debug draw.
Generic6DOFJoint3D over stacking specialized joints unless you need a specific node UX.> Progressive disclosure: open Official Documentation links only when researching a specific API;
> load Related Skills when routing work to a peer domain — do not preload the whole lattice.
CollisionShape3D breaks normals and contacts._integrate_forces instead of fighting the solver with per-frame transforms.PhysicalBoneSimulator3D / PhysicalBone3D setup for death sims and animation↔physics handoff.RayCast3D vs PhysicsDirectSpaceState3D queries, exclusions, and space access during the physics tick.free_rid cleanup.RayCast3D misses ledges or uneven floors._physics_process discipline underpin server-side and CharacterBody3D patterns here.body_entered / contact-monitor wiring needs clean ownership so Area3D gravity wells and CCD hits do not spam.PhysicalBoneSimulator3D.PhysicsServer3D swarms, soft bodies, or CCD counts become bottlenecks.VehicleBody3D suspension/friction tuning and drift feel consume the vehicle and Jolt guidance here.Take thedivergentai/godot-physics-3d from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.