Skip to content

Commit 2bbf455

Browse files
-Fix GetOffsetPositionReverse (#306)
1 parent 986d602 commit 2bbf455

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

Runtime/Tiles/HexagonalRuleTile/HexagonalRuleTile.cs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -124,12 +124,7 @@ public override Vector3Int GetOffsetPosition(Vector3Int position, Vector3Int off
124124
/// <returns>The reversed offset position.</returns>
125125
public override Vector3Int GetOffsetPositionReverse(Vector3Int position, Vector3Int offset)
126126
{
127-
Vector3Int offsetPosition = position - offset;
128-
129-
if (offset.y % 2 != 0 && position.y % 2 != 0)
130-
offsetPosition.x -= 1;
131-
132-
return offsetPosition;
127+
return GetOffsetPosition(position, GetRotatedPosition(offset, 180));
133128
}
134129

135130
/// <summary>

0 commit comments

Comments
 (0)