شعار Godot Physics

Godot Physics

المجتمع
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.

نظرة عامة

الناشرEL4CTEO
المستودعgodot-skills
اسم المهارةgodot-physics
النجوم
60
التفريعات
6
الملفات المرفقة
1
الترخيصMIT
الروابط
  • تعليمات بصيغة Markdown

    ملف SKILL.md يُحمّله النموذج عند الحاجة، فلا يستهلك توكنات إلا عندما يَرِد طلب ذو صلة فعلًا.

  • تعمل مع أي نموذج لغوي كبير

    مهارات الذكاء الاصطناعي مكتوبة بصيغة Markdown وليست شيفرة خاصة بمزوّد معيّن، لذا تعمل مع GPT أو Claude أو Gemini أو Grok أو نموذج محلي.

  • الملفات المرفقة: 1

    نصوص برمجية وقوالب ومراجع يمكن للنموذج قراءتها أثناء عمله. الملفات للقراءة فقط ولا تُنفّذ أبدًا.

  • مفتوحة المصدر

    نشرها EL4CTEO على GitHub. اطّلع على المصدر قبل تثبيتها.

التثبيت

ثبّت مهارة الذكاء الاصطناعي Godot Physics في TypingMind لاستخدامها مع أي نموذج لغوي كبير، أو أضفها إلى وكيل ذكاء اصطناعي آخر يقرأ SKILL.md.

1

التثبيت في TypingMind

يُثبّت TypingMind المهارة مباشرةً من مجلدها على GitHub — فيقرأ SKILL.md، ويجمع ملفات الموارد في حزمة، ويحفظ النتيجة محليًا.

  1. افتح التطبيق وانتقل إلى «الإضافات» ثم «المهارات».
  2. اختر «تثبيت من GitHub».
  3. الصق رابط مجلد المهارة الموضّح أدناه وأكّد التثبيت.
    https://github.com/EL4CTEO/godot-skills/tree/main/skills/godot-physics
  4. فعّل المهارة في كل محادثة تريد إتاحتها فيها.
الإضافات ← المهارات ← إضافة مهارة ← من رابط GitHub، ثم الصق رابط المجلد واضغط على «متابعة».
2

التثبيت في وكيل ذكاء اصطناعي آخر

يمكن لأي وكيل ذكاء اصطناعي يقرأ تنسيق Agent Skills استخدام هذه المهارة — انسخ المجلد إلى مجلد المهارات الخاص بذلك الوكيل.

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
أعد تشغيل Claude Code بعد النسخ ليتعرّف على المهارة الجديدة.

استخدمها في TypingMind

فعّل Godot Physics في أي محادثة على TypingMind وسيتولى النموذج الباقي. تتضمن مطالبة النظام اسمها ووصفها، وبمجرد ورود طلب ذي صلة، يُحمّل النموذج التعليمات الكاملة تلقائيًا — فلا تحتاج إلى استدعائها يدويًا، ولا تستهلك أي توكنات حتى تُستخدم فعليًا.

يُحمّل النموذج مهارة Godot Physics تلقائيًا بمجرد ورود طلب ذي صلة بها.

تعمل مع أي نموذج ذكاء اصطناعي

مهارات الذكاء الاصطناعي هي تعليمات بصيغة Markdown وليست شيفرة خاصة بمزوّد معيّن، لذا لا ترتبط Godot Physics بالنموذج الذي كُتبت له. ثبّتها مرة واحدة في TypingMind واستخدمها مع GPT-5 أو Claude أو Gemini أو Grok أو DeepSeek أو Mistral أو Llama أو نموذج محلي تشغّله بنفسك — كل ذلك باستخدام مفاتيح API الخاصة بك.

  • تُحمَّل عند الحاجة فقط

    تتضمن مطالبة النظام الاسم والوصف فقط. وتُجلب التعليمات عند أول طلب ذي صلة، لذا لا تستهلك تعليمات المهارة أي توكنات ما دامت المهارة غير مستخدمة.

  • بدّل النماذج أثناء المحادثة

    لأن المهارة تعليمات وليست شيفرة، فإن تغيير النموذج لا يعطّلها — فالنموذج التالي يقرأ ملف SKILL.md نفسه.

تعليمات المهارة

هذا هو محتوى SKILL.md الذي يُحمّله النموذج. اقرأه قبل التثبيت — فالمهارة عبارة عن تعليمات سيتبعها نموذجك.

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

الملفات المرفقة

يقرأ النموذج هذه الملفات عند الحاجة ما دامت المهارة محمّلة. وهي متاحة للقراءة ولا تُنفّذ أبدًا.

الأسئلة الشائعة

ماذا تفعل مهارة الذكاء الاصطناعي 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.

لماذا تستخدم Godot Physics على TypingMind؟

لأنك تثبّتها مرة واحدة وتستخدمها مع أي نموذج. مهارة Godot Physics عبارة عن نص Markdown وليست شيفرة خاصة بمزود بعينه، لذا تعمل المهارة نفسها مع GPT-5 أو Claude أو Gemini أو Grok أو نموذج محلي، ويمكنك تبديل النموذج أثناء المحادثة دون تعطّل المهارة. يعمل TypingMind بمفاتيح API الخاصة بك، فتدفع للمزودين مباشرةً بدلًا من اشتراك لكل مقعد، وتبقى مهاراتك ومحادثاتك في مساحة التخزين الخاصة بك.

كيف أثبّت Godot Physics في TypingMind؟

في TypingMind، افتح «الإضافات»، ثم «المهارات»، ثم اختر «التثبيت من GitHub» والصق https://github.com/EL4CTEO/godot-skills/tree/main/skills/godot-physics. يقرأ TypingMind ملف SKILL.md الخاص بالمهارة، ويجمع ملفاتها ويثبّتها كمهارة يمكنك تفعيلها لكل محادثة على حدة.

ما نماذج الذكاء الاصطناعي التي يمكنها استخدام Godot Physics؟

أي نموذج تربطه في TypingMind. مهارات الذكاء الاصطناعي عبارة عن تعليمات Markdown وليست شيفرة خاصة بمزود بعينه، لذا يمكن لكل من GPT وClaude وGemini وGrok والنماذج المحلية تحميل هذه المهارة عندما يتوافق الطلب معها.

كم نموذج ذكاء اصطناعي يمكنني استخدامه مع Godot Physics؟

أي عدد تريده. ما دام النموذج يدعم المهارات، يمكنك استخدام Godot Physics معه، سواء كان GPT أو Claude أو Gemini أو Grok أو DeepSeek أو Mistral أو Llama أو غيرها، وكل ذلك على TypingMind باستخدام مفاتيح API الخاصة بك.

هل مهارة الذكاء الاصطناعي Godot Physics مجانية؟

نعم. نشرها EL4CTEO على GitHub بموجب ترخيص MIT. لا تدفع إلا لمزود الذكاء الاصطناعي الخاص بك مقابل التوكنات التي تستخدمها.

ما هي مهارات الذكاء الاصطناعي؟

مهارة الذكاء الاصطناعي حزمة تعليمات قابلة لإعادة الاستخدام تعلّم نموذج الذكاء الاصطناعي كيفية تنفيذ مهمة محددة. وتتبع تنسيق Agent Skills المفتوح: ملف SKILL.md يتضمن اسمًا ووصفًا، إلى جانب أي نصوص برمجية أو قوالب أو ملفات مرجعية قد يحتاج إليها النموذج. لا يقرأ النموذج التعليمات إلا عندما يتوافق طلبك مع المهارة، لذا لا تترتب على المهارة المثبتة أي تكلفة حتى تُستخدم.

كيف تختلف مهارات الذكاء الاصطناعي عن الإضافات أو موصلات MCP؟

تمنح الإضافة أو موصل MCP النموذج أدوات جديدة يمكنه استدعاؤها، وهي شيفرة تُنفَّذ في مكان ما وتُرجع نتيجة. أما مهارة الذكاء الاصطناعي فتزوّد النموذج بالمعرفة ومنهجية العمل: كيفية التعامل مع مهمة، والخطوات التي ينبغي اتباعها، وما ينبغي أن تكون عليه المخرجات الجيدة. المهارات عبارة عن نصوص Markdown، لذا لا تحتاج إلى خادم أو مفتاح API أو بيئة تشغيل، وتعمل مع أي نموذج.

عرض الكل

أنشئ مساحة عملك للذكاء الاصطناعي الآن

اشترك في نشرتنا الإخبارية لتصلك أخبار الميزات الجديدة والهدايا القادمة 👇