Search Issue Tracker
By Design
By Design in 2023.3.X
Votes
0
Found in
2021.3.31f1
2022.3.10f1
2023.1.16f1
2023.2.0b12
2023.3.0a8
Issue ID
UUM-52686
Regression
No
Hexagonal Grid is not returning the correct cell position when using GridLayout.WorldToCell
How to reproduce:
1. Open the user's attached project
2. Enable SampleScene/Root_Launcher/Marker_Position in the Hierarchy window
3. Enter Play Mode
4. Move the mouse around in the Game view
Expected results: The correct cell is highlighted
Actual results: The highlighted cell is in the wrong position
Reproducible with: 2021.3.31f1, 2022.3.10f1, 2023.1.16f1, 2023.2.0b12, 2023.3.0a8
Reproducible on: Windows 11 22H2
Not reproducible on: No other environment tested
Notes: Using Rectangle Cell Layout returns the correct position
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Texture2D hash changes inside of an AssetBundle when rebuilding a SpriteAtlas bundle with an empty AssetPostprocessor Script enabled
- Aniso Level still applies when Generate MipMap is disabled in Texture Import Settings
- Mipmap Limit Groups long names are not truncated when creating a new Mipmap Limit Group with a long name
- “ArgumentException: Invalid double parameter.” error is thrown when Infinity is typed into the Fixed Timestep field
- GameObject becomes gray when using HDRP and STP together on macOS
Resolution Note:
The user is translating the target's World Space position to the corresponding Cell Position of the Hexagonal Grid. This will correctly give the Cell Position on the Hexagonal Grid.
The Cell Position on the Hexagonal Grid is not always equal to its corresponding World Space position in value. The purpose of the Grid is to help translate Cell Positions on the Grid to its corresponding Local and World Space positions and vice versa.
User should instead be translating the target's World Space position to the Grid's Cell Position and then translating the Grid's Cell Position to the Grid's World Space Position for this case, to get the correct rounded position of the Hexagonal cell.
Resolution Note (2023.3.X):
The user is translating the target's World Space position to the corresponding Cell Position of the Hexagonal Grid. This will correctly give the Cell Position on the Hexagonal Grid.
The Cell Position on the Hexagonal Grid is not always equal to its corresponding World Space position in value. The purpose of the Grid is to help translate Cell Positions on the Grid to its corresponding Local and World Space positions and vice versa.
User should instead be translating the target's World Space position to the Grid's Cell Position and then translating the Grid's Cell Position to the Grid's World Space Position for this case, to get the correct rounded position of the Hexagonal cell.