Logo: Godot Physics

Godot Physics

Communautéit
EL4CTEO
godot-physics

Physics in Godot 4.7 (2D and 3D, Jolt default) - choosing body types, CharacterBody movement and floors/slopes/platforms, RigidBody forces and freezing, Area triggers, collision layers/masks, raycasts and shape queries, physics interpolation, ragdolls (PhysicalBoneSimulator3D), joints, Jolt differences and settings. Use for movement, collisions, triggers, projectiles, vehicles or ragdolls.

Iwwersiicht

EditeurEL4CTEO
Repositorygodot-skills
Skill-Nummgodot-physics
Stären
60
Forks
6
Matgeliwwert Dateien
1
LizenzMIT
Linken
  • Instruktiounen am Markdown-Format

    Eng SKILL.md-Datei, déi de Modell bei Bedarf luet, soudatt nëmmen Token ufalen, wann eng Ufro tatsächlech dozou passt.

  • Funktionéiert mat all LLM

    KI-Skills si reng Markdown, keen ubidderspezifesche Code. Dofir funktionéiert dëse Skill mat GPT, Claude, Gemini, Grok oder engem lokale Modell.

  • 1 matgeliwwert Dateien

    Skripten, Virlagen a Referenzen, déi de Modell beim Schaffe liese kann. D'Dateie kënnen nëmme gelies ginn a ginn ni ausgeféiert.

  • Open Source

    EL4CTEO huet de Skill op GitHub verëffentlecht. Liest de Quelltext, ier Dir de Skill installéiert.

Installatioun

Installéiert de KI-Skill Godot Physics an TypingMind, fir e mat all LLM ze benotzen, oder setzt en an en anere KI-Agent an, deen SKILL.md liest.

1

An TypingMind installéieren

TypingMind installéiert e Skill direkt aus sengem GitHub-Dossier — dobäi gëtt SKILL.md gelies, d'Ressourcedateie gi gebëndelt an d'Resultat gëtt lokal gespäichert.

  1. Maacht d'App op a gitt op Plugins → Skills.
  2. Wielt „Vu GitHub installéieren“.
  3. Pecht d'URL vum Skill-Dossier, déi hei drënner steet, an a bestätegt d'Installatioun.
    https://github.com/EL4CTEO/godot-skills/tree/main/skills/godot-physics
  4. Aktivéiert de Skill an all Chat, an deem Dir e benotze wëllt.
Plugins → Skills → Skill derbäisetzen → Iwwer eng GitHub-URL. Pecht dann d'URL vum Dossier an a klickt op Weider.
2

An engem anere KI-Agent installéieren

All KI-Agent, deen d'Format Agent Skills liest, kann dëse Skill benotzen — kopéiert den Dossier an d'Skill-Verzeechnes vun deem KI-Agent.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/EL4CTEO/godot-skills.git /tmp/godot-skills
mkdir -p .claude/skills
cp -r /tmp/godot-skills/skills/godot-physics .claude/skills/godot-physics
Start Claude Code nom Kopéieren nei, fir datt den neie Skill erkannt gëtt.

An TypingMind benotzen

Aktivéiert Godot Physics an engem Chat vun TypingMind, an de Modell iwwerhëlt de Rescht. Den Numm an d'Beschreiwung stinn am System-Prompt. Soubal eng Ufro dozou passt, luet de Modell déi komplett Instruktioune selwer — Dir musst de Skill ni manuell opruffen, an et fale keng Token un, bis en tatsächlech benotzt gëtt.

De Modell luet Godot Physics automatesch, soubal eng Ufro dozou passt.

Funktionéiert mat all KI-Modell

KI-Skills si reng Markdown-Instruktiounen amplaz vun ubidderspezifeschem Code. Dofir ass Godot Physics net un de Modell gebonnen, fir deen de Skill geschriwwe gouf. Installéiert en eemol an TypingMind a benotzt e mat GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder engem lokale Modell, deen Dir selwer bedreift — alles mat Ären eegenen API-Schlësselen.

  • Gëtt nëmme gelueden, wann et néideg ass

    De System-Prompt enthält nëmmen den Numm an d'Beschreiwung. D'Instruktioune gi bei der éischter passender Ufro gelueden, soudatt en onbenotzte Skill näischt kascht.

  • De Modell am lafende Chat wiesselen

    Well de Skill aus Instruktiounen amplaz vu Code besteet, funktionéiert en och no engem Modellwiessel — den nächste Modell liest déi selwecht SKILL.md-Datei.

Skill-Instruktiounen

Dëst ass den Inhalt vu SKILL.md, deen de Modell luet. Liest e virun der Installatioun — e Skill besteet aus Instruktiounen, déi Äre Modell befollegt.

Physics (4.7)

Check the engine first: project_inspect.py → physics_3d. New 4.6+ projects use Jolt. Older ones may still run GodotPhysics3D (DEFAULT). 2D always uses Godot's 2D engine. Code that touches physics goes in _physics_process (fixed tick, physics/common/physics_ticks_per_second, default 60).

Choose the body

BodyUse forYou control
CharacterBody2D/3Dplayers, NPCs, anything with scripted movementvelocity, then move_and_slide()
RigidBody2D/3Dcrates, debris, balls, physics propsforces and impulses (apply_central_impulse) or _integrate_forces(state)
AnimatableBody2D/3Dmoving platforms, doors, elevatorsposition via AnimationPlayer or a tween (sync_to_physics)
StaticBody2D/3Dlevel geometry (constant_linear_velocity for conveyors)nothing
Area2D/3Dtriggers, hitboxes, pickups, gravity and wind zonessignals and overlap queries
Never move a RigidBody by setting position each frame. Use forces, freeze, or PhysicsServer3D.body_set_state for teleports.

CharacterBody essentials

  • Gravity: velocity += get_gravity() * delta reads Area overrides too. Then call move_and_slide(), which takes no arguments in 4.x.
  • Floors: up_direction, floor_max_angle, floor_snap_length (raise it for stairs and ramps), floor_stop_on_slope, floor_constant_speed. Also is_on_floor/wall/ceiling() and get_floor_normal().
  • Moving platforms: platform_on_leave (keep or drop the platform's velocity). Riding works automatically on AnimatableBody and RigidBody.
  • Collisions: loop get_slide_collision_count() → get_slide_collision(i).get_collider(), for example to push rigid bodies (see the reference).
  • Stairs: Jolt and GodotPhysics have no automatic step-up. Use small ramps or a capsule plus snap, or a step-up raycast routine.
  • Use a capsule collider for characters. Boxes snag on edges.

Layers and masks

  • Layer means "what I am". Mask means "what I scan for". Name the layers in Project Settings → Layer Names (project_inspect.py lists them).
  • In code: set_collision_layer_value(3, true) and set_collision_mask_value(2, false) use 1-based layer numbers. Exports: @export_flags_3d_physics var mask := 1.
  • A typical scheme: 1 world, 2 player, 3 enemies, 4 player hitbox, 5 enemy hurtbox, 6 pickups, 7 interactables. Projectiles only mask what they can hit.

Queries

  • Use RayCast3D/ShapeCast3D nodes for persistent checks (ground, line of sight, interaction). Call force_raycast_update() for an immediate result within the same frame.
  • One-off checks: get_world_3d().direct_space_state.intersect_ray(PhysicsRayQueryParameters3D.create(from, to, mask, [self_rid])) returns a dictionary (position, normal, collider, rid, face_index), or empty on a miss. Run it only in _physics_process.
  • Mouse picking in 3D: camera.project_ray_origin(mouse) and project_ray_normal, then the ray query above. Control nodes must not swallow the event first (mouse_filter).
  • intersect_shape, cast_motion and get_rest_info work for area-of-effect and sweeps.

Physics interpolation (smooth at any frame rate)

Turn on physics/common/physics_interpolation. Move and rotate physics-driven objects only in _physics_process. After a teleport, call reset_physics_interpolation(). Cameras that follow interpolated targets should follow in _process, or use get_global_transform_interpolated().

Ragdolls (3D)

Use Skeleton3D → PhysicalBoneSimulator3D (4.3+) → PhysicalBone3D children, created with the Skeleton3D menu "Create Physical Skeleton". Toggle with physical_bones_start_simulation()/physical_bones_stop_simulation(), and use influence to blend with animation. Active ragdolls should be driven by the simulator, not by moving the bones yourself.

Jolt specifics (default in new projects)

  • Better stacking, performance and determinism than GodotPhysics. Area3D reports overlaps with SoftBody3D (4.7) and static bodies.
  • Unsupported joint parameters (bias, softness, relaxation and limit softness/restitution) print warnings. Single-body joints treat the body as node_b (setting physics/jolt_physics_3d/joints/world_node).
  • WorldBoundaryShape3D has a limited effective size (limits/world_boundary_shape_size), and its plane.d sign flipped in 4.7. Prefer a big box for floors.
  • Ray face_index needs queries/enable_ray_cast_face_index. Kinematic contacts need simulation/generate_all_kinematic_contacts, which costs performance.
  • Tune limits for large worlds: limits/max_bodies, max_body_pairs and max_contact_constraints.

Fast objects

Bullets and projectiles: use a raycast from the last to the current position each tick (hitscan), or RigidBody3D.continuous_cd = true. Thin walls plus fast bodies tunnel otherwise.

Controllers, interaction, pushing, queries and ragdoll code (compiled by the tests): references/patterns.md

Matgeliwwert Dateien

De Modell liest dës Dateie bei Bedarf, wärend de Skill gelueden ass. Si ginn als liesbar Dateie bereetgestallt a ginn ni ausgeféiert.

Heefeg gestallte Froen

Wat mécht de KI-Skill Godot Physics?

Physics in Godot 4.7 (2D and 3D, Jolt default) - choosing body types, CharacterBody movement and floors/slopes/platforms, RigidBody forces and freezing, Area triggers, collision layers/masks, raycasts and shape queries, physics interpolation, ragdolls (PhysicalBoneSimulator3D), joints, Jolt differences and settings. Use for movement, collisions, triggers, projectiles, vehicles or ragdolls.

Firwat Godot Physics op TypingMind benotzen?

Well Dir en eemol installéiert a mat all Modell benotze kënnt. Godot Physics besteet aus einfachem Markdown amplaz vun ubidderspezifeschem Code. Dee selwechte Skill funktionéiert also mat GPT-5, Claude, Gemini, Grok oder engem lokale Modell – an Dir kënnt de Modell matzen am Chat wiesselen, ouni datt de Skill ophält ze funktionéieren. TypingMind benotzt Är eegen API-Schlësselen, sou datt Dir d'Ubidder direkt bezuelt, amplaz en Abonnement pro Benotzerplaz ze bezuelen. Är Skills a Chats bleiwen an Ärem eegene Späicher.

Wéi installéieren ech Godot Physics an TypingMind?

Maacht an TypingMind Plugins → Skills → Vu GitHub installéieren op a setzt https://github.com/EL4CTEO/godot-skills/tree/main/skills/godot-physics an. TypingMind liest d'Datei SKILL.md, bëndelt déi zougehéiereg Dateien an installéiert dat Ganzt als Skill, deen Dir pro Chat aktivéiere kënnt.

Wéi eng KI-Modeller kënnen Godot Physics benotzen?

All Modell, deen Dir an TypingMind verbënnt. KI-Skills sinn einfach Markdown-Instruktiounen an net ubidderspezifesche Code. Dofir kënne GPT, Claude, Gemini, Grok a lokal Modeller dëse Skill lueden, wann eng Ufro dozou passt.

Wéi vill KI-Modeller kann ech mat Godot Physics benotzen?

Esou vill wéi Dir wëllt. Soulaang e Modell Skills ënnerstëtzt, kënnt Dir Godot Physics domat benotzen – zum Beispill mat GPT, Claude, Gemini, Grok, DeepSeek, Mistral oder Llama – alles op TypingMind mat Ären eegenen API-Schlësselen.

Ass de KI-Skill Godot Physics gratis?

Jo. EL4CTEO huet de Skill ënner der Lizenz MIT op GitHub publizéiert. Dir bezuelt nëmmen Ären eegene KI-Ubidder fir d'Token, déi Dir benotzt.

Wat si KI-Skills?

E KI-Skill ass e weiderverwendbare Pak vun Instruktiounen, deen engem KI-Modell bäibréngt, wéi en eng bestëmmt Aufgab erfëllt. E follegt dem oppenen Agent Skills-Format: eng Datei SKILL.md mat engem Numm an enger Beschreiwung, plus all Scripten, Virlagen oder Referenzdateien, déi de Modell eventuell brauch. De Modell liest d'Instruktiounen eréischt, wann Är Ufro zum Skill passt. En installéierte Skill kascht also näischt, bis e benotzt gëtt.

Wéi ënnerscheede sech KI-Skills vu Plugins oder MCP-Serveren?

E Plugin oder MCP-Server gëtt engem Modell nei Tools, déi en opruffe kann – Code, deen iergendwou leeft an e Resultat zeréckgëtt. E KI-Skill gëtt dem Modell dogéint Wëssen an eng Virgoensweis: wéi en eng Aufgab ugeet, wéi eng Schrëtt e maache soll a wéi eng gutt Ausgab ausgesäit. Skills bestinn aus einfachem Markdown, brauche kee Server, keen API-Schlëssel a kee Lafzäitëmfeld a funktionéiere mat all Modell.

Alleguer weisen

Elo Ären eegene KI-Aarbechtsberäich ariichten

Abonnéiert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukünfteg Gewënnspiller informéiert ze ginn 👇