Skip to content

Fix #249: refine contraption armor direction scanning#254

Open
Ally-for-Hire wants to merge 1 commit intoACE-Project-Team:devfrom
Ally-for-Hire:fix/249-contraption-direction-scan
Open

Fix #249: refine contraption armor direction scanning#254
Ally-for-Hire wants to merge 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

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.

1 participant