When using 2D Tilemaps to spawn 3D Tiles, the orientation of the 3D tile does not match 2D cell orientation

Hello!

I’m using the 2D Tilemap system + Ruletiles to spawn 3D objects to create a 3D Tilemap. The system works great, however, when the system spawns the 3D object, it does not compensate for the cell swizzle/cell direction. It seems as if the system was designed to spawn objects only for a 2D platformer kind of game, and when working on a top down kind of game, the only solution I found to circumvent this is to rotate my 3D tiles by -90 on X, which is far from ideal and elegant.

Here’s a video explaining my problem:

This problem has been raised before on a few discussions:

Any ideas on how to approach this in a more elegant way would be greatly appreciated!
Thanks!

This is typically the mechanism used to convert Blender and most FBX files (right hand coordinate system with Z going UP) into Unity’s left-hand coordinate system with Y going up. It’s everywhere.

If you instead make a prefab such that it looks correct at Quaternion.identity rotation, you can do all the rotations you need in child objects.

Hey Kurt, thanks for the reply! I know what you mean but this is not the case here. The model is imported with the correct orientation. The problem is with how the tilemap system spawns GameObjects. If you notice in the inspector, when I change the cell orientation in the grid map, it changes the 2D tile transform to 90 0 0, which gets carried into the spawned object. Ideally, there would be an option to only use a tile’s position when spawning prefabs.

Late for the party but here: [2d Tilemap] Tile's "Game Object to Instantiate" doesn't rotate with Tilemap orientation

1 Like