DestinationSol
DestinationSol copied to clipboard
fix(mazes): fix incorrect box2d fixtures for maze tiles
Description
This pull request fixes incorrect maze collisions by partially-reverting the maze tile changes in https://github.com/MovingBlocks/DestinationSol/commit/e5f6c68524ef8867d06c80c504bb127ccdde643a. This causes the sprite tile textures to be correctly flipped, although it prevent mazes from using animated sprites.
Before

After

Testing
- In the
engine/src/main/resources/debugOptions.inifile, setdrawPhysicBorderstotrueandspawnPlacetomaze. - 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
- This fixes #576.
I wonder if this also fixes #552 or #59 ? Different meshes tho.
Looking at this again, it seems like the maze collision issue was introduced in https://github.com/MovingBlocks/DestinationSol/commit/e5f6c68524ef8867d06c80c504bb127ccdde643a. 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.
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.