Laser – Fix seeker LOS failing#11155
Merged
PabstMirror merged 2 commits intoacemod:masterfrom Dec 9, 2025
Merged
Conversation
rautamiekka
suggested changes
Dec 5, 2025
Comment on lines
+151
to
+156
| if (_testIntersections isNotEqualTo [] ) then { | ||
| _testIntersections = _testIntersections select { | ||
| _x params ["_intersectPosASL"]; | ||
| (_intersectPosASL vectorDistanceSqr _testPos) > 0.01; | ||
| }; | ||
| }; |
Contributor
There was a problem hiding this comment.
I think it'd be a good idea to see if it's faster to just do the select, since select might already do something like the if before actually iterating, so the 152-155 code never runs if there's nothing to iterate and thus no _x to assign.
^ Even if it doesn't do such a pre-check, it might still be faster.
Contributor
Author
There was a problem hiding this comment.
Thanks for the suggestion! I’ve updated the code to remove the redundant if check and just use select directly. Appreciate the feedback!
PabstMirror
approved these changes
Dec 9, 2025
Contributor
|
seems to work great another possibility would be to check if emitter can see the new point |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #11136
When merged this pull request will:
Details
lineIntersectsSurfacesoften reports collisions on the outer surface of a vehicle or object, even when the laser spot is actually unobstructed.This caused the seeker to incorrectly conclude that the spot was not visible.
To avoid this, intersections that are extremely close to the test target position are ignored:
Notes
While this fix resolves the issue, I am not fully confident that this is the ideal or final approach.
I am not sure whether
0.01is the correct value.Additionally, during the initial ray generation for the laser hit point:
fnc_shootRay.sqf:L42it might be more appropriate to move the generated laser point slightly further back instead of filtering intersections.
Determining which method is more accurate and robust is not entirely clear, so expert review and feedback would be greatly appreciated.
Visual Demonstration
Bug https://youtu.be/yzAUM3LvGcA
Seeker LOS Check Fail Bug Fix Test Value 0.1 https://youtu.be/SGpFVMbf5Ek
Seeker LOS Check Fail Bug Fix Test Value 0.01 https://youtu.be/s91oweIRLXg
Seeker LOS Check Fail Bug Fix Test Value 0.001 https://youtu.be/9EEKgjx29JQ
Image From Bug

Image From Seeker LOS Check Fail Bug Fix Test Value 0.01

Testing Debug Code
Below is the code I used during debugging.
Please insert it right after the line I modified.
IMPORTANT
Component - Add|Fix|Improve|Change|Make|Remove {changes}.