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.
About the PR
Fixes hitscan visuals when shooting across grids.
Technical details
This PR just makes sure that the angle passed in the event is always relative to the entity associated with the
fromCoordinate
, and makes sure that all the parts of the beam have the same world rotation.I finished this PR after fixing #34482, but before realising that there is already an open PR that also tries to fix this (#28797), though it's been stuck waiting on an engine PR that was waiting for reviews/responses. I'm not sure about the required engine changes and think a better fix would be to just combine the laser effect into a singular entity (which this neither PR does).
In the meantime, this PR still fixes the main issue w/o requiring any engine changes, though it doesn't fix the problem that the beam can split when grids move or rotate.
fixes #23699
Media
Before: see video in #5365
After:
Content.Client_EnDBPw28Yi.mp4
Requirements
Changelog
IMO @n00kii still deserves the credit for initially working on a fix for this bug, but if they don't want their name on the CL I can remove it
🆑 n00kii