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

Some unit/building collision detection tweaks #1171

Merged
merged 1 commit into from
Sep 7, 2024

Conversation

hemoridos
Copy link
Contributor

  • Fixed alternate ground unit images not being trimmed, causing extra load when running collision detection.
  • Added an extra check before attempting to create a collision image for ground units behind buildings.
    The unit and tile objects' intersecting rectangle's side, and bottom lines are checked first if they touch any pixels in the tile object. This culls any instances where the unit is within the tile object's bounding rectangle, but further from the actual image.

image

…oad when running collision detection.

Added an extra check befor attempting to create a collision image for ground units behind buildings.
@akarnokd akarnokd merged commit 560e547 into akarnokd:master Sep 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants