Unity-Kampfphysik
Macht Unity-Treffer durch abgestimmte Bewegung, Kollisionsabfragen und Schadenszuständigkeit zuverlässig. Behandelt schnelle Geschosse und Figuren mit mehreren Collidern ohne doppelte Trefferwertung.
unity-combat-physics
Agenten mit diesem Skill
Wann ist der Skill hilfreich?
Nutze ihn bei verfehlenden schnellen Geschossen oder doppeltem beziehungsweise veraltetem Schaden durch Pooling und Mehrfachcollider.
Wobei hilft er dir?
- Reproduziert Durchtunneln vor Wahl kontinuierlicher Kollision oder Sweeps.
- Ordnet mehrere Collider einem beschädigbaren Akteur zu.
- Setzt Treffer, Geschwindigkeit und verzögerte Callbacks gepoolter Geschosse zurück.
Das könntest du fragen
Behebe Pfeile, die in einer Unity-Arena dünne Ziele durchfliegen. Reproduziere den Fehler bei geplanter Geschwindigkeit, wähle eine passende Kollisions- oder Bahnprüfung und ordne mehrere Körpercollider einem Ziel zu. Prüfe beim wiederverwendeten Pfeil einen Treffer, neue Geschwindigkeit und keine verspätete Wirkung des vorigen Flugs.
Ausführliche Dokumentation
Hier findest du die ursprüngliche Anleitung, Beispiele und Prüfschritte des Skills in ihrer Originalsprache.
Weniger anzeigen
Combat Physics and Hit Detection
Inspect Unity version, 2D versus 3D physics, fixed step, time scaling, layers, movement authority and actual projectile speed/size. State what counts as one hit and who may apply damage.
- Reproduce tunneling at the real speed and thinnest intended collider. Start with the existing collision mode; choose supported continuous detection or a swept query when measurement warrants it. CCD is not a guarantee for every body shape, trigger or moving target.
- Physics movement and forces belong to their simulation contract. Avoid render-frame-dependent impulses and direct transform writes that compete with a simulated Rigidbody. Evaluate interpolation separately from authoritative collision.
- Use explicit query masks and trigger policy. Filter the shooter, allies and already-hit targets according to the mechanic. Resolve a collider to the owning damageable entity so a multi-collider actor is not damaged repeatedly by one intended hit.
- For pooled projectiles, reset hit registries, velocity, lifetime, ignored collision pairs, ownership and delayed callbacks. A callback from a previous lifetime must not affect a reused projectile.
- Bound non-allocating query buffers and handle saturation; a full buffer is not proof that all hits were returned. Do not assume unsorted query results are distance ordered.
- Diagnose fixed steps per frame and catch-up spikes before shrinking the fixed timestep. Check collision callbacks, queries and allocations at representative projectile counts.
Verify thin-wall hits, moving targets, repeated contacts, pause/slow motion, pooled reuse, friendly-fire rules and a dense encounter. Record observed misses and CPU cost; do not claim universal CCD reliability.
Reference: the project-version Unity physics manual. The upstream skill's helper scripts and performance numbers are not installed or independently verified here.
Enthaltene Dateien 2
LICENSE.txtSKILL.md
