Logo von Ue Physics And Chaos

Ue Physics And Chaos

Community
kevinpbuckley
ue-physics-and-chaos

Implement collision, physics simulation, and world queries using Unreal's Chaos physics engine in C++ — collision channels (ECollisionChannel), response types (ECollisionResponse / ECR_Block/Overlap/Ignore), collision presets and profiles, query vs physics collision (ECollisionEnabled), FBodyInstance damping/mass, SetSimulatePhysics, AddForce/AddImpulse, line traces and shape sweeps (LineTraceSingleByChannel, SweepSingleByChannel, OverlapMultiByChannel), FHitResult/FCollisionQueryParams, hit and overlap events (OnComponentHit, OnComponentBeginOverlap), physical materials (UPhysicalMaterial friction/restitution), ragdoll via UPhysicsAsset, and physics constraints (FConstraintInstance, UPhysicsConstraintComponent). Use when setting up what collides with what, creating trigger volumes, doing line/shape traces for aiming or interaction, simulating rigid-body objects, applying forces or impulses, building ragdolls, constraining bodies, or debugging missing hit/overlap events.

Übersicht

Herausgeberkevinpbuckley
Repositoryunreal-engine-skills
Skill-Nameue-physics-and-chaos
Sterne
89
Forks
9
Mitgelieferte Dateien
3
Links
  • Anweisungen in Markdown

    Eine SKILL.md-Datei, die das Modell bei Bedarf lädt. So werden nur dann Token verbraucht, wenn eine Anfrage tatsächlich dazu passt.

  • Funktioniert mit jedem LLM

    KI-Skills bestehen aus reinem Markdown, nicht aus anbieterspezifischem Code. Daher funktionieren sie mit GPT, Claude, Gemini, Grok oder einem lokalen Modell.

  • Mitgelieferte Dateien: 3

    Skripte, Vorlagen und Referenzmaterial, die das Modell bei der Arbeit lesen kann. Die Dateien sind schreibgeschützt und werden niemals ausgeführt.

  • Open Source

    Von kevinpbuckley auf GitHub veröffentlicht. Prüfen Sie vor der Installation die Quelldateien.

Installation

Installieren Sie den KI-Skill Ue Physics And Chaos in TypingMind, um ihn mit jedem LLM zu nutzen, oder fügen Sie ihn einem anderen Agenten hinzu, der SKILL.md lesen kann.

1

In TypingMind installieren

TypingMind installiert einen Skill direkt aus seinem GitHub-Ordner. Dabei liest die App SKILL.md, bündelt die Ressourcendateien und speichert das Ergebnis lokal.

  1. Öffnen Sie die App und gehen Sie zu Plugins → Skills.
  2. Wählen Sie „Von GitHub installieren“.
  3. Fügen Sie die unten angegebene URL des Skill-Ordners ein und bestätigen Sie.
    https://github.com/kevinpbuckley/unreal-engine-skills/tree/master/skills/core/ue-physics-and-chaos
  4. Aktivieren Sie den Skill in jedem Chat, in dem er verfügbar sein soll.
Plugins → Skills → Skill hinzufügen → Über GitHub-URL. Fügen Sie dann die Ordner-URL ein und klicken Sie auf „Weiter“.
2

In einem anderen Agenten installieren

Jeder Agent, der das Agent-Skills-Format unterstützt, kann diesen Skill nutzen. Kopieren Sie den Ordner in das Skill-Verzeichnis des jeweiligen Agenten.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/kevinpbuckley/unreal-engine-skills.git /tmp/unreal-engine-skills
mkdir -p .claude/skills
cp -r /tmp/unreal-engine-skills/skills/core/ue-physics-and-chaos .claude/skills/ue-physics-and-chaos
Starten Sie Claude Code nach dem Kopieren neu, damit der neue Skill erkannt wird.

In TypingMind verwenden

Aktivieren Sie Ue Physics And Chaos in einem beliebigen Chat in TypingMind. Den Rest übernimmt das Modell. Name und Beschreibung des Skills stehen im System-Prompt. Sobald eine Anfrage passt, lädt das Modell selbstständig die vollständigen Anweisungen — Sie müssen den Skill nie manuell aufrufen, und er verbraucht erst Token, wenn er tatsächlich genutzt wird.

Das Modell lädt Ue Physics And Chaos automatisch, sobald eine passende Anfrage gestellt wird.

Funktioniert mit jedem KI-Modell

KI-Skills bestehen aus reinen Markdown-Anweisungen statt aus anbieterspezifischem Code. Daher ist Ue Physics And Chaos nicht an das Modell gebunden, für das der Skill geschrieben wurde. Installieren Sie ihn einmal in TypingMind und nutzen Sie ihn mit GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder einem selbst betriebenen lokalen Modell — alles mit Ihren eigenen API-Schlüsseln.

  • Wird nur bei Bedarf geladen

    Der System-Prompt enthält nur den Namen und die Beschreibung. Die Anweisungen werden bei der ersten passenden Anfrage geladen. Ein ungenutzter Skill verursacht daher keine Kosten.

  • Modell im laufenden Chat wechseln

    Da der Skill aus Anweisungen statt aus Code besteht, funktioniert er auch nach einem Modellwechsel — das nächste Modell liest dieselbe SKILL.md-Datei.

Skill-Anweisungen

Dies ist der Inhalt von SKILL.md, den das Modell lädt. Lesen Sie ihn vor der Installation — ein Skill besteht aus Anweisungen, denen Ihr Modell folgt.

Physics & collision (Chaos)

Chaos is the physics engine in UE. Most gameplay needs three things from it: collision (what blocks/overlaps what), queries (traces/sweeps to ask about the world), and occasionally simulation (rigid bodies, ragdolls, constraints). Collision setup mistakes are the most common source of "my overlap/hit never fires" bugs.

When to use this skill

  • Setting up what collides with what (channels, presets, per-channel responses).
  • Making trigger volumes or detecting overlaps between actors.
  • Line/shape tracing the world (aiming, ground checks, interaction detection).
  • Simulating physics objects — enabling rigid-body physics, applying forces/impulses.
  • Building ragdolls or constraining bodies with UPhysicsConstraintComponent.
  • Debugging "overlap never fires", "trace misses", or "physics not simulating" problems.

Collision model — three controls per component

Every UPrimitiveComponent has three collision controls:

  1. Object type (ECollisionChannel) — what this component is. Built-in: ECC_WorldStatic, ECC_WorldDynamic, ECC_Pawn, ECC_PhysicsBody, ECC_Visibility, ECC_Camera. Custom channels map to ECC_GameTraceChannel1–ECC_GameTraceChannel50 at runtime (expanded from 18 to 50 in 5.8).

  2. Response per channel (ECollisionResponse) — how it reacts to each channel: ECR_Ignore, ECR_Overlap, ECR_Block.

  3. Collision enabled mode (ECollisionEnabled::Type) — what the shape participates in:

    • NoCollision — no physics, no queries.
    • QueryOnly — overlaps/traces; no rigid-body simulation. Best for trigger volumes.
    • PhysicsOnly — rigid-body sim only; traces don't hit it.
    • QueryAndPhysics — both. Default for most simulated objects.

Block requires both sides to set ECR_Block for the other's object type. For overlap events, both sides need ECR_Overlap response and bGenerateOverlapEvents = true.

cpp
// Set up a trigger sphere: query-only, ignore everything except pawns.
Trigger->SetCollisionEnabled(ECollisionEnabled::QueryOnly);
Trigger->SetCollisionObjectType(ECC_WorldDynamic);
Trigger->SetCollisionResponseToAllChannels(ECR_Ignore);
Trigger->SetCollisionResponseToChannel(ECC_Pawn, ECR_Overlap);
Trigger->SetGenerateOverlapEvents(true);

Collision presets bundle object type + responses into a named profile. Apply with SetCollisionProfileName(TEXT("Trigger")) to match a project preset or one defined in Project Settings → Collision. Applying a preset overwrites per-channel overrides, so call any fine-grained SetCollisionResponseToChannel calls after the preset.

See references/collision-channels-and-profiles.md for the full channel list, custom-channel setup, and preset internals.

Hit & overlap events

Bind in BeginPlay (not the constructor — no world available there):

cpp
void AMyActor::BeginPlay()
{
    Super::BeginPlay();
    // Overlap: trigger volume notifying actor entry
    Trigger->OnComponentBeginOverlap.AddDynamic(this, &AMyActor::OnBeginOverlap);
    // Hit: physics body reporting impact
    Mesh->OnComponentHit.AddDynamic(this, &AMyActor::OnHit);
}

// Exact delegate signatures required — see PrimitiveComponent.h:1457,1468
UFUNCTION()
void AMyActor::OnBeginOverlap(UPrimitiveComponent* Comp, AActor* Other,
    UPrimitiveComponent* OtherComp, int32 OtherBodyIndex,
    bool bFromSweep, const FHitResult& Sweep) { /* ... */ }

UFUNCTION()
void AMyActor::OnHit(UPrimitiveComponent* HitComp, AActor* Other,
    UPrimitiveComponent* OtherComp, FVector NormalImpulse, const FHitResult& Hit) { /* ... */ }

Handlers must be UFUNCTION() — dynamic delegates require UObject reflection. For hit events on simulating bodies, also enable Simulation Generates Hit Events on the body (FBodyInstance::bNotifyRigidBodyCollision). See ue-actors-and-components for delegate binding patterns and ue-delegates-and-events for the delegate system.

Traces & sweeps

cpp
// Line trace — first blocking hit on ECC_Visibility
FHitResult Hit;
FCollisionQueryParams Params(SCENE_QUERY_STAT(MyTrace), /*bTraceComplex=*/false);
Params.AddIgnoredActor(this);   // never hit self

if (GetWorld()->LineTraceSingleByChannel(Hit, GetActorLocation(),
        GetActorLocation() + GetActorForwardVector() * 2000.f, ECC_Visibility, Params))
{
    // Hit.GetActor(), Hit.ImpactPoint, Hit.ImpactNormal, Hit.PhysMaterial
}

// Sphere sweep — shape-based query
FHitResult SweepHit;
GetWorld()->SweepSingleByChannel(SweepHit, Start, End, FQuat::Identity,
    ECC_Pawn, FCollisionShape::MakeSphere(40.f), Params);

// Overlap query — all bodies overlapping a box at a point
TArray<FOverlapResult> Overlaps;
GetWorld()->OverlapMultiByChannel(Overlaps, Center, FQuat::Identity,
    ECC_WorldDynamic, FCollisionShape::MakeBox(FVector(50.f)), Params);

FHitResult fields to know: Time (0–1 along trace), Distance, Location (shape center at contact), ImpactPoint (surface contact), ImpactNormal, GetActor(), GetComponent(), BoneName, PhysMaterial.

Multi-variants (LineTraceMultiByChannel, SweepMultiByChannel) return all overlaps up to and including the first block — useful for bullets through foliage.

See references/traces-and-queries.md for ByObjectType, async traces, UV coordinates from hits, and debug-draw helpers.

Simulating rigid bodies

cpp
// Enable physics simulation — requires simple collision on the mesh asset.
Mesh->SetSimulatePhysics(true);
Mesh->SetCollisionEnabled(ECollisionEnabled::QueryAndPhysics);
Mesh->SetCollisionProfileName(TEXT("PhysicsActor"));

// Mass: override per component or let BodyInstance compute from density/volume.
Mesh->SetMassOverrideInKg(NAME_None, 80.f);

// Forces and impulses (world space by default):
Mesh->AddImpulse(FVector(0.f, 0.f, 600000.f));          // instantaneous kg*cm/s
Mesh->AddForce(FVector(0.f, 0.f, 98000.f));              // continuous N per physics step
Mesh->AddImpulseAtLocation(Impulse, HitPoint);           // torque from off-center

AddForce accumulates over each physics substep; AddImpulse applies once in the current step. Damping is on the FBodyInstance (accessible via GetBodyInstance()): LinearDamping and AngularDamping (both at BodyInstance.h).

Simulating bodies must have simple collision (sphere/box/capsule/convex hull). Complex per-triangle collision cannot drive rigid-body simulation.

Ragdolls and physics assets

A ragdoll runs through a UPhysicsAsset (authored in the Physics Asset Editor), which defines per-bone bodies and constraints for a USkeletalMeshComponent:

cpp
GetMesh()->SetSimulatePhysics(true);                    // whole-body ragdoll
GetMesh()->SetCollisionProfileName(TEXT("Ragdoll"));
// For blended / partial ragdoll, use UPhysicalAnimationComponent.

Physics constraints

UPhysicsConstraintComponent wraps FConstraintInstance and joins two simulated bodies:

cpp
// ConstraintComp is a UPROPERTY(VisibleAnywhere) TObjectPtr<UPhysicsConstraintComponent>
ConstraintComp->SetConstrainedComponents(CompA, NAME_None, CompB, NAME_None);
ConstraintComp->SetLinearXLimit(LCM_Free, 0.f);         // allow X-axis translation
ConstraintComp->SetAngularSwing1Limit(ACM_Limited, 45.f); // 45° swing limit
ConstraintComp->ConstraintInstance.OnConstraintBroken.BindUObject(this,
    &AMyActor::OnConstraintBroken);

BreakConstraint() on the component tears the joint at runtime. FConstraintInstance also supports drives (motors): SetLinearPositionDrive, SetAngularDriveMode.

See references/physics-simulation-and-constraints.md for FBodyInstance details, damping, sub-stepping, and constraint drives.

Physical materials

UPhysicalMaterial (under Runtime/PhysicsCore) stores surface properties referenced by both UStaticMesh and UPrimitiveComponent. Key fields: Friction, StaticFriction, Restitution, Density, SurfaceType (EPhysicalSurface). Assign via the mesh asset or at runtime with GetBodyInstance()->PhysMaterialOverride.

Read SurfaceType from a hit to drive effects (footstep sounds, particle emitters): Hit.PhysMaterial.Get()->SurfaceType.

Collision complexity

ModeUsesSim?Notes
Simpleprimitives / convex hullyesRequired for rigid-body sim; cheap queries
Complexper-trianglenoPrecise static queries (landscape, detailed meshes)

Set per-mesh in the Static/Skeletal Mesh asset collision settings, and optionally override on the component. Use FCollisionQueryParams::bTraceComplex = true to query complex.

Gotchas

  • Overlap never fires — both components need ECR_Overlap response to each other's object type and bGenerateOverlapEvents = true on both. One side being ECR_Block still generates an overlap if the other is ECR_Overlap, but only one fires.
  • Hit event never fires — enable Simulation Generates Hit Events (bNotifyRigidBodyCollision on FBodyInstance); physics sim must also be enabled.
  • Trace misses everything — check ECollisionEnabled on targets; NoCollision or PhysicsOnly makes them invisible to traces.
  • Simulating on complex-collision mesh — physics simulation requires simple collision; complex (per-triangle) collision cannot be simulated.
  • Forgot AddIgnoredActor(this) — trace hits own actor's collision shapes.
  • Handler not UFUNCTION() — AddDynamic silently fails; the method must be a UFUNCTION() with the exact delegate signature.
  • Applying a preset then per-channel overrides — SetCollisionProfileName resets all responses; set per-channel responses after calling it.
  • Force vs. Impulse units — AddForce is Newtons (applied each substep); AddImpulse is kg·cm/s (applied once). Scale accordingly.
  • SetSimulatePhysics(true) silently does nothing — the mesh has no simple collision, or SetCollisionEnabled is NoCollision/QueryOnly.

Version notes

Chaos replaced PhysX as the default physics engine in UE5. The Chaos solver runs deterministic substeps controlled by UPhysicsSettings::AsyncFixed (Project Settings → Physics → Simulation → Use Async Scene). FBodyInstance is stable across UE5; solver internals differ from PhysX but the UPrimitiveComponent API is unchanged.

References & source material

Engine source (UE 5.8, under Engine/Source/):

  • Runtime/Engine/Classes/Engine/EngineTypes.h — ECollisionChannel:1098, ECollisionResponse:1346, ECollisionEnabled:1805, FCollisionResponseContainer:1445.
  • Runtime/Engine/Classes/Engine/HitResult.h — FHitResult:20.
  • Runtime/Engine/Classes/Components/PrimitiveComponent.h — OnComponentHit:1457, OnComponentBeginOverlap:1468, SetGenerateOverlapEvents:418, SetSimulatePhysics:1661, AddImpulse:1692, AddForce:1759, SetCollisionEnabled:2026, SetCollisionProfileName:2036, SetCollisionObjectType:2047, SetCollisionResponseToAllChannels:2952, GetBodyInstance:2337, SetMassOverrideInKg:2857.
  • Runtime/Engine/Classes/PhysicsEngine/BodyInstance.h — LinearDamping:629, AngularDamping:633.
  • Runtime/Engine/Classes/PhysicsEngine/ConstraintInstance.h — FConstraintInstance:254, SetLinearLimits:358, InitConstraint:949.
  • Runtime/Engine/Classes/PhysicsEngine/PhysicsConstraintComponent.h — UPhysicsConstraintComponent:24, BreakConstraint:142, SetLinearPositionDrive:151, SetAngularDriveMode:213.
  • Runtime/Engine/Classes/Engine/World.h — LineTraceSingleByChannel:2161, LineTraceMultiByChannel:2210, SweepSingleByChannel:2286, SweepMultiByChannel:2325, OverlapMultiByChannel:2418.
  • Runtime/Engine/Public/CollisionQueryParams.h — FCollisionQueryParams:42, AddIgnoredActor:243, bTraceComplex:51.
  • Runtime/PhysicsCore/Public/PhysicalMaterials/PhysicalMaterial.h — UPhysicalMaterial:103, Friction:115, Restitution:131, Density:147, SurfaceType:181.

Official docs (UE 5.8):

Deep-dive references in this skill:

Related skills: ue-actors-and-components (component types, overlap wiring), ue-meshes-static-and-skeletal (collision geometry on assets).

Mitgelieferte Dateien

Das Modell liest diese Dateien bei Bedarf, während der Skill geladen ist. Sie werden als lesbare Dateien bereitgestellt und niemals ausgeführt.

Häufig gestellte Fragen

Was macht der KI-Skill Ue Physics And Chaos?

Implement collision, physics simulation, and world queries using Unreal's Chaos physics engine in C++ — collision channels (ECollisionChannel), response types (ECollisionResponse / ECR_Block/Overlap/Ignore), collision presets and profiles, query vs physics collision (ECollisionEnabled), FBodyInstance damping/mass, SetSimulatePhysics, AddForce/AddImpulse, line traces and shape sweeps (LineTraceSingleByChannel, SweepSingleByChannel, OverlapMultiByChannel), FHitResult/FCollisionQueryParams, hit and overlap events (OnComponentHit, OnComponentBeginOverlap), physical materials (UPhysicalMaterial...

Warum Ue Physics And Chaos in TypingMind nutzen?

Weil Sie den Skill einmal installieren und mit jedem Modell verwenden können. Ue Physics And Chaos besteht aus reinem Markdown statt aus anbieterspezifischem Code. So funktioniert derselbe Skill mit GPT-5, Claude, Gemini, Grok oder einem lokalen Modell – und Sie können das Modell mitten im Chat wechseln, ohne dass der Skill seine Funktion verliert. TypingMind verwendet Ihre eigenen API-Schlüssel. Sie bezahlen die Anbieter daher direkt statt über ein Abonnement pro Nutzerplatz, und Ihre Skills und Chats bleiben in Ihrem eigenen Speicher.

Wie installiere ich Ue Physics And Chaos in TypingMind?

Öffnen Sie in TypingMind Plugins → Skills → Von GitHub installieren und fügen Sie https://github.com/kevinpbuckley/unreal-engine-skills/tree/master/skills/core/ue-physics-and-chaos ein. TypingMind liest die Datei SKILL.md, bündelt die zugehörigen Dateien und installiert alles als Skill, den Sie für jeden Chat einzeln aktivieren können.

Welche KI-Modelle können Ue Physics And Chaos nutzen?

Jedes Modell, das Sie mit TypingMind verbinden. KI-Skills bestehen aus reinen Markdown-Anweisungen statt aus anbieterspezifischem Code. Daher können GPT, Claude, Gemini, Grok und lokale Modelle diesen Skill laden, wenn eine Anfrage dazu passt.

Wie viele KI-Modelle kann ich mit Ue Physics And Chaos verwenden?

So viele Sie möchten. In TypingMind können Sie Ue Physics And Chaos mit jedem Modell verwenden, das Skills unterstützt, etwa mit GPT, Claude, Gemini, Grok, DeepSeek, Mistral oder Llama. Dabei nutzen Sie Ihre eigenen API-Schlüssel.

Ist der KI-Skill Ue Physics And Chaos kostenlos?

Der Skill wird von kevinpbuckley auf GitHub veröffentlicht. Prüfen Sie im Repository, ob dort Lizenzbedingungen angegeben sind. Sie bezahlen nur Ihren eigenen KI-Anbieter für die verwendeten Token.

Was sind KI-Skills?

Ein KI-Skill ist ein wiederverwendbares Anweisungspaket, das einem KI-Modell vermittelt, wie es eine bestimmte Aufgabe erledigt. Es folgt dem offenen Format Agent Skills: Die Datei SKILL.md enthält den Namen und die Beschreibung des Skills. Hinzu kommen bei Bedarf Skripte, Vorlagen oder Referenzdateien für das Modell. Das Modell liest die Anweisungen nur, wenn Ihre Anfrage zum Skill passt. Ein installierter Skill verursacht daher erst Kosten, wenn er verwendet wird.

Wie unterscheiden sich KI-Skills von Plugins oder MCP-Servern?

Ein Plugin oder MCP-Server stellt einem Modell neue aufrufbare Tools bereit – Code, der auf einem System ausgeführt wird und ein Ergebnis zurückgibt. Ein KI-Skill vermittelt dem Modell stattdessen Wissen und Vorgehensweisen: wie es eine Aufgabe angeht, welche Schritte es befolgt und wie eine gute Ausgabe aussieht. Skills bestehen aus reinem Markdown und kommen daher ohne Server, API-Schlüssel und Laufzeitumgebung aus. Sie funktionieren mit jedem Modell.

Alle anzeigen

Jetzt eigenen KI-Arbeitsbereich einrichten

Abonnieren Sie unseren Newsletter und erfahren Sie mehr über neue Funktionen und kommende Gewinnspiele 👇