Skip to content

Fix construction placement controls and ACE action compatibility - #5

Open
Etaselia wants to merge 1 commit into
SceptreOfficial:mainfrom
Etaselia:eta/fix-construction-placement
Open

Fix construction placement controls and ACE action compatibility#5
Etaselia wants to merge 1 commit into
SceptreOfficial:mainfrom
Etaselia:eta/fix-construction-placement

Conversation

@Etaselia

Copy link
Copy Markdown

Why this is needed

Some CUP objects include a decorative ground plane or ground texture underneath the visible model. That plane is intended to sit below the terrain, but the current placement code treats its lowest edge as the bottom of the object. Since there is no way to lower the object or allow that part of the model to clip into the terrain, the visible object ends up floating above the ground. Manual height adjustment and optional ground clipping make it possible to place these objects as intended.

There is also a compatibility problem with current ACE interaction action-tree storage. The construction completion interaction can be recreated repeatedly, causing finished objects to spawn continuously. This quickly destroys frame rate and makes the construction system unusable. Reading the action tree through the current ACE API prevents the duplicate interaction while retaining a fallback for older ACE versions.

Summary

  • Read construction action trees through the current ACE API, with a fallback for older action storage.
  • Prevent the completed-object interaction from being recreated repeatedly.
  • Add manual height adjustment, terrain/sea-level alignment, and optional ground clipping while placing objects.
  • Snap construction crates to the terrain so they remain reachable when the placed object is elevated or clipped.

Placement controls

  • Alt + mouse wheel: adjust object height.
  • T: toggle terrain-level and sea-level alignment.
  • C: toggle ground clipping.

The default alignment, clipping behavior, height step, and placement hint can be configured through CBA settings.

Validation

  • The changed logistics files compiled successfully as part of the full local mod build.
  • Construction placement controls and the completion flow were tested in Arma 3.

The final crate terrain-contact adjustment should also be checked on steep and uneven terrain during review.

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