Skip to content

Fix #249: refine contraption armor direction scanning#254

Merged
MartyX5555 merged 1 commit intoACE-Project-Team:devfrom
Ally-for-Hire:fix/249-contraption-direction-scan
Apr 28, 2026
Merged

Fix #249: refine contraption armor direction scanning#254
MartyX5555 merged 1 commit intoACE-Project-Team:devfrom
Ally-for-Hire:fix/249-contraption-direction-scan

Conversation

@Ally-for-Hire
Copy link
Copy Markdown
Contributor

Fixes #249.

Refines contraption front/side armor direction scanning to be more consistent, less dependent on arbitrary entity choice, and harder to mislead with unusual layouts.

What Changed

  • Replaced the old single-entity direction anchoring with contraption-wide basis resolution.
  • Derived principal horizontal axes from the contraption footprint instead of relying on a gun or scanned entity orientation.
  • Mapped those axes to front and side using contraption-wide forward/right dot-product voting.
  • Simplified wheel influence so it comes from wheel-to-base positional offsets rather than base entity local axes.
  • Scaled wheel evidence by detected wheel pairs instead of total entity count.
  • Changed the scan origin to the contraption centroid so region bucketing and quantization do not vary based on which entity was inspected.
  • Switched shape analysis from equal weighting of all OBB corners to weighted entity-center sampling, which reduces sensitivity to outlier appendages.
  • Reworked front sign handling so it no longer falls back to a world-axis sign tie-break.
  • Expanded trace start distances to use full contraption projection bounds with configurable padding.
  • Added TracePadding to ACE.ArmorScanConfig.

Why

The previous approach was too easy to skew with arbitrary entity placement, single-entity orientation, or short trace distances. This pass is meant to make the scan quieter and more predictable so normal builds do not notice it, while still behaving reasonably on awkward or missile-heavy contraptions.

NEEDS IN-GAME TESTING AND VERIFICATION, I'M LIABLE TO MISSING THINGS

@MartyX5555 MartyX5555 merged commit f05b12f into ACE-Project-Team:dev Apr 28, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants