godot-physics-3d
Original:🇺🇸 English
Translated
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.
9installs
Added on
NPX Install
npx skill4agent add thedivergentai/gd-agentic-skills godot-physics-3dTags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →3D Physics (Jolt/Native)
Expert guidance for high-performance 3D physics and ragdolls.
NEVER Do
- NEVER scale RigidBody3D — Scale collision shapes, NEVER the body itself. Non-uniform scaling breaks physics engines logic.
- NEVER use inside
move_and_slide— Always use_process. Frame-rate dependency kills simulation stability._physics_process - NEVER simulate ragdolls 24/7 — Only enable physical bones on death or impact. Animate static meshes otherwise to save CPU.
- NEVER ignore Jolt — Godot Jolt plugin is strictly superior to default Godot Physics in 4.x for stability and performance. Use it if possible.
- NEVER use ConcaveCollisionShape3D for dynamic bodies — Concave shapes (Trimesh) are for static ground only. Moving bodies MUST be Convex or Primitive (Box/Capsule).
Available Scripts
ragdoll_manager.gd
Expert manager for transitioning Skeleton3D from animation to physical simulation (death effect). Handles impulse application and cleanup.
raycast_visualizer.gd
Debug tool to visualize hit points and normals of RayCast3D in game.
Core Architecture
1. Layers & Masks (3D)
Same as 2D:
- Layer: What object IS.
- Mask: What object HITS.
2. Physical Bones (Ragdolls)
Godot uses nodes attached to bones.
To setup:
PhysicalBone3DSkeleton3D- Select Skeleton3D.
- Click "Create Physical Skeleton" in top menu.
- This generates nodes.
PhysicalBone3D
3. Jolt Joints
Use for almost everything. It covers hinge, slider, and ball-socket needs with simpler configuration than specific nodes.
Generic6DOFJoint3DRagdoll Implementation
gdscript
# simple_ragdoll.gd
extends Skeleton3D
func start_ragdoll() -> void:
physical_bones_start_simulation()
func stop_ragdoll() -> void:
physical_bones_stop_simulation()Reference
- Master Skill: godot-master