Skip to content
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

Fixing bounding box errors #79493

Merged
merged 1 commit into from
Feb 3, 2025
Merged

Conversation

PatrikLundell
Copy link
Contributor

Summary

None

Purpose of change

  • Change vehicle::bounding_box to produce what it says it should produce.
  • Fix heli crash mx.
  • Fix appliance merge usage of bounding box to work with the corrected version.

Describe the solution

  • Change bounding_box to return the stated relative boundaries of the box, rather than the bubble coordinates of the same.
  • Fix the heli crash mx logic to use the bounding box rather than just assume it's symmetric around the nominal position of the craft. This wasn't strictly necessary.
  • Fix the appliance merge to compensate for the missing bubble coordinates.

Describe alternatives you've considered

Testing

Generated a bunch of heli crash mx, and they look reasonable.
Screenshot (645)

The merging was harder to test, because the variables involved were optimized away (so I couldn't compare the original values before the change to those after). Tested by revealing a bunch of wires at a farming supply store and merged them by revealing the part in between them. However, that worked even before the bubble position compensation was added, so that doesn't show too much.

Additional context

The heli crash mx just happened to work because the default position of a vehicle object is the zero point, so the offsets become the only components of the resultant coordinates.

@github-actions github-actions bot added Vehicles Vehicles, parts, mechanics & interactions [C++] Changes (can be) made in C++. Previously named `Code` astyled astyled PR, label is assigned by github actions json-styled JSON lint passed, label assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions labels Feb 2, 2025
@Maleclypse Maleclypse merged commit f72fb5c into CleverRaven:master Feb 3, 2025
29 checks passed
@PatrikLundell PatrikLundell deleted the bounding_box branch February 3, 2025 07:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
astyled astyled PR, label is assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions [C++] Changes (can be) made in C++. Previously named `Code` json-styled JSON lint passed, label assigned by github actions Vehicles Vehicles, parts, mechanics & interactions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants