Skip to content

feat: collision damage response - impact energy, component damage, no light-tap explosions #172

Description

@MBarkerUK

Summary

Collision, hitbox, and general game-issue improvement — the honest capability split. Geometry (collision LODs, hitbox shape) is baked into the P3D and unfixable by a mod (#128 finding). But the interaction surface is scriptable: hitpoint damage, HandleDamage response, and the collision-response behaviour (the #154 light-tap explosion complaint). This issue scopes what AEE can genuinely improve.

The Honest Split (verified)

BAKED — unfixable by a mod (document, don't claim)

SCRIPTABLE — the genuine AEE scope

The Genuine Improvement Targets

1. The collision-damage response (the #154 light-tap fix)

The #159 complaint: "random explosions on light taps" — the engine's collision damage thresholds. What a mod CAN do:

  • Scale collision damage by the REAL physics: impact energy = 0.5·m·v² at the impact (the HitPart data gives the collision). A gentle bump at 5 km/h is low-energy → low damage; a crash at 80 km/h is high → component damage, not guaranteed explosion
  • The threshold fix: replace the binary explosion with the feat: vehicle armour and penetration overhaul (STANAG-aligned) #126 component-damage cascade — a light tap damages the bumper hitpoint, not the whole vehicle
  • The HandleDamage guard: intercept HandleDamage for collision damage, scale it by the real impact energy, return the scaled value (the ACE3 double-count guard pattern from feat: vehicle armour and penetration overhaul (STANAG-aligned) #126)

2. Hitbox interaction refinement (scripted, not geometry)

3. The general game-issue fixes (from the #159/#154 audits)

The #78 bugfix addon scope, validated by the complaint research:

The Architecture

HitPart EH (verified, #144) — the impact data: position, velocity, selection, surface
    │
    ▼
IMPACT MODEL (the physics)
    │  impact energy = 0.5·m·v² (real)
    │  the selection → the hitpoint (glass/engine/hull/tracks)
    │  the #126 penetration → does the round matter?
    ▼
DAMAGE RESPONSE (scriptable)
    │  HandleDamage scaled by the real impact energy
    │  component damage, not the binary explosion
    ▼
the #126 component cascade + the #168 armour interaction

The Honest Walls (documented)

  • The collision hull shape: baked, no mod changes it
  • The collision detection rate: engine-internal
  • The ragdoll/vehicle-crash physical response: engine PhysX

Implementation

  1. fnc_handleImpact.sqf — the HitPart collision handler: compute the real impact energy, scale HandleDamage
  2. The damage-response guard (the ACE3 double-count pattern from feat: vehicle armour and penetration overhaul (STANAG-aligned) #126)
  3. The selection→hitpoint mapping (glass vs engine vs hull)
  4. The component cascade (from feat: vehicle armour and penetration overhaul (STANAG-aligned) #126) replaces the binary explosion for collision damage
  5. Gate: the existing bugfix settings pattern (feat: aee_bugfix addon patching vanilla engine issues #78)

Test Vectors

  • 5 km/h bump → minor hitpoint damage, no explosion
  • 80 km/h crash → component damage, engine/tracks affected, no guaranteed explosion
  • Round to the glass → glass hitpoint damage, driver risk; round to the hull → hull damage
  • The HandleDamage guard returns the scaled value (ACE3-compatible)

Sources

Labels

core, P2-medium, effort/M, type/feat, phase/2-expansion, mobility, physics, infra

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P2-mediumMedium priority — important but not blockingcoreCore systems, main tick, deterministiceffort/MMedium — 3-5 days, cross-systeminfraInfrastructure and toolingmobilityTraction, movement, terrain interactionphase/2-expansionPhase 2 — cross-addon wiring, integrationphysicsPhysics modelling and simulationtype/featNew feature

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions