Tilemap collision object not scaled with container go (SOLVED)

Hi
Not sure if this is a bug or if I’m missing something.
I have a tilemap made up of 32x32 tiles and a player sprite which is 64x64. I have set up a collision object using the tilemap to have impassable walls.
I scaled up the map.go containing the tilemap to x:2, y:2 in order to get the sizes correct on screen.
However it seems the collision object in the map.go does not scale. The collisions occur as if the tilemap were half the size it is shown on screen.
If I reset the scale to 1 the collisions occur as expected.

This seems like a bug doesn’t it?

You can verify if the collision objects scale correctly or not by checking “Debug” under the physics settings in game.project.

26

Are you scaling the tilemap in the editor or in runtime after gameobject creation? Currently we don’t support physics scaling in runtime (DEF-521) discussed here: Scaling Collision Object when Game Object is scaled (DEF-521)

I scale by setting the go property in the editor.

The physics debug shows the colliders are not scaled up.

My scale settings:

We only support uniform scaling of collisions objects. E.g. try scaling the Z axis as well.

4 Likes

Great! If I scale z too it works fine!

Thanks :slight_smile:

4 Likes