-
Notifications
You must be signed in to change notification settings - Fork 749
Explosives - Taking bounding box into consideration when attaching #11335
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from 4 commits
1f786f4
8781be7
8ebce9a
71f9740
3239dd1
68269c8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -200,6 +200,25 @@ GVAR(TweakedAngle) = 0; | |
| if (GVAR(placeAction) == PLACE_APPROVE) then { | ||
| private _placeAngle = 0; | ||
| private _expSetupVehicle = _setupObjectClass createVehicle [0, 0, 0]; //(_virtualPosASL call EFUNC(common,ASLToPosition)); | ||
| // Running it AGAIN in here because it needs the _expSetupVehicle Object for the boundingBox | ||
| _intersect = lineIntersectsSurfaces [ | ||
| eyePos _unit, | ||
| _basePosASL vectorAdd (_lookDirVector vectorMultiply PLACE_RANGE_MAX), | ||
| _unit, _expSetupVehicle, true, 1, "FIRE", "GEOM" | ||
| ] param [0, []]; | ||
| _virtualPosASL = if (_intersect isNotEqualTo []) then { | ||
| _intersect params ["_posASL", "_normal"]; | ||
|
|
||
| if (_normal isEqualTo [0,0,0]) then { | ||
| _normal = surfaceNormal _posASL; | ||
| }; | ||
|
Comment on lines
+212
to
+214
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What's this part of the code supposed to catch?
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not optimistic about uncertain code - either give it a comment or remove it.
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, no, i will remove it, it was originally a code that would create an Ace circle tag where the explosive was, and when it was in a ramp in a certain modded object it returned 0,0,0 and would place a floating/clipping circle in the ramp, so that was a bandaid fix. on the second hand, iirc if there isn't a FireGeo LOD it defaults to normal Geo right? i should probably replace |
||
|
|
||
| private _bbox = boundingBoxReal [_expSetupVehicle, "FireGeometry"]; | ||
| _offset = -((_bbox select 0) select 2); | ||
|
deBearN marked this conversation as resolved.
Outdated
|
||
| _posASL vectorAdd (_normal vectorMultiply _offset); | ||
| } else { | ||
| _basePosASL vectorAdd (_lookDirVector vectorMultiply _distanceFromBase); | ||
| }; | ||
|
|
||
| TRACE_1("Planting Mass",getMass _expSetupVehicle); | ||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.