You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix!: Update IsometricTileMapComponent to have better defined position and size (#3142)
Update IsometricTileMapComponent to have better defined position and
size.
Before, the isometric component "zero" would be the center of the 0,0
block.
However, that does not play nicely with our component system if you want
to know the size (i.e. bounding box) of a component.
This changes so that the 0,0 of the component is the 0,0 of the AABB
around the isometric tiles. Then, it also computes the size of the
component accordingly.
This also changes the example to allow toggling between half and full
size more easily.
In our example, this is what it looks like:

The example still shows how to compute the previous origin (the purple
dot) if you want to.
With full size blocks:

This is a minor breaking change as you might need to "reposition" your
tile components, essentially remove the "compensation" for its location
that you probably did yourself. If you were centering the tile component
based on the available methods such as `map.getBlockCenterPosition`,
then just make sure you are adding the `map.position` to that and it
should work as before.
0 commit comments