Skip to content

Explosives - Taking bounding box into consideration when attaching#11335

Open
deBearN wants to merge 6 commits intoacemod:masterfrom
deBearN:Explosive_Direction_Fix
Open

Explosives - Taking bounding box into consideration when attaching#11335
deBearN wants to merge 6 commits intoacemod:masterfrom
deBearN:Explosive_Direction_Fix

Conversation

@deBearN
Copy link
Copy Markdown

@deBearN deBearN commented Apr 3, 2026

Previously objects would clip into the object it was being place in:
image

Now using their bounding box i move them so they stay right on the limit as if they were properly attached:
image

Seems to work with most modded explosives (i didn't find one it didn't work with).

The "problem" with the fix is having to re-calculate the _basePosASL when you can place it, because i need the Object from _expSetupVehicle to get the bounding box, feel free to give me directions on how to improve it.

also double check if i did this correctly because my fork path is ACE3>>MyUnitFork>>MyFork, so i had to create a branch, do a hard reset to upstream(ACE3) and then commit and publish, want to make sure it's all good.

Copy link
Copy Markdown
Contributor

@DartRuffian DartRuffian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Formatting, make variables private

deBearN and others added 2 commits April 3, 2026 14:24
@Drofseh Drofseh changed the title Taking B-box into consideration for explosives Taking bounding box into consideration for explosives Apr 3, 2026
@PabstMirror PabstMirror added this to the 3.21.1 milestone Apr 4, 2026
@PabstMirror PabstMirror added the kind/enhancement Release Notes: **IMPROVED:** label Apr 4, 2026
@PabstMirror PabstMirror changed the title Taking bounding box into consideration for explosives Explosives - Taking bounding box into consideration when attaching Apr 4, 2026
Comment on lines +212 to +214
if (_normal isEqualTo [0,0,0]) then {
_normal = surfaceNormal _posASL;
};
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's this part of the code supposed to catch?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here? probably nothing, i got some of my code from one of my scripts that had vectors in them, so it was probably left-over from something, in case the object bottom was pointing at the sky resets it

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

Labels

kind/enhancement Release Notes: **IMPROVED:**

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants