[Bug?] Maybe YZX swizzle and ZXY swizzle are exchanged wrongly, aren't they?

I have a question about Grid Component’s Swizzle property.

From Swizzle description at reference guide 2D Experimental Preview R1 Reference Guide - Google Docs

Swizzles the cell positions to other axii. For Example. In XZY mode, the Y and Z coordinates will be swapped, so an input Y coordinate will map to Z instead and vice versa.

In my understanding,

  • XYZ swizzle means that tiles on XY plane with Z normal axis. Used with XY tilemap orientation.
  • YXZ swizzle means that tiles on YX plane with Z normal axis. Used with YX tilemap orientation.
  • XZY swizzle means that tiles on XY plane with Y normal axis. Used with XZ tilemap orientation.
  • ZYX swizzle means that tiles on ZY plane with X normal axis. Used with ZY tilemap orientation.

But, unlike my expectation YZX swizzle and ZXY swizzle behaviours are

  • YZX swizzle setting, Grid plane is XZ plane with Y normal axis.
  • ZXY swizzle setting, Grid plane is ZY plane with X normal axis.

Is my understanding wrong? Or Grid Component bug?

1 Like

In my environment Preview3 Update, this issue is not fixed.

The Grid swizzle just means transposing the output from the layout (logical cell-space) to local-space. It has nothing to do with the TileMap as the Grid component isn’t even aware of the TileMap’s presence. I assume you already know this but it’s very important to state.

The Grid doesn’t have planes either, even the Rect layout is 3D so it’s effectively a Box volume layout however you can think of planes if you use Cell Position Z = 0 all the time so only using 2 axis.

XYZ simply means no transposition is done so the output of the layout stays the same.

YZX means that the X is output as the Z axis, Y is output in the X axis and Z is output in the Y axis. In other words, the Y is position in X, Z is positioned in Y and X is positioned in Z.

A cell layout output of (10,20,0) with a swizzle of YZX will output (20,0,10)