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

fix(mazes): fix incorrect box2d fixtures for maze tiles #644

Merged

Conversation

BenjaminAmos
Copy link
Contributor

@BenjaminAmos BenjaminAmos commented Jan 30, 2022

Description

This pull request fixes incorrect maze collisions by partially-reverting the maze tile changes in e5f6c68. This causes the sprite tile textures to be correctly flipped, although it prevent mazes from using animated sprites.

Before

image

After

image

Testing

  • In the engine/src/main/resources/debugOptions.ini file, set drawPhysicBorders to true and spawnPlace to maze.
  • Start a new game.
  • Fly left towards the nearest maze.
  • Verify that all of the maze colliders are roughly the right shape and in the right place.
  • Try flying through the maze passages.

Notes

@Cervator
Copy link
Member

I wonder if this also fixes #552 or #59 ? Different meshes tho.

@BenjaminAmos BenjaminAmos force-pushed the fix-maze-collisions branch from 72fbf6b to 888b882 Compare July 12, 2022 19:53
@BenjaminAmos
Copy link
Contributor Author

Looking at this again, it seems like the maze collision issue was introduced in e5f6c68. The animated sprite code was never used after being implemented, so I've changed this PR to revert the changes made to MazeTileObject in that commit instead, which should be a better approach.

The approach previously in this PR 'fixed' the problem by never rotating the sprites. I only realised recently that this was incorrect. The new changes should actually fix the issue.

@BenjaminAmos
Copy link
Contributor Author

This pull request reverts the code to a known state where it previously worked, so there shouldn't be much risk in merging it without further delay.

@BenjaminAmos BenjaminAmos merged commit 29cd39f into MovingBlocks:develop Sep 3, 2022
@BenjaminAmos BenjaminAmos deleted the fix-maze-collisions branch September 3, 2022 15:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

Bad collision boxes for maze
2 participants