Search Issue Tracker
By Design
Under Consideration for 2021.3.X, 2022.3.X, 2023.1.X, 2023.2.X, 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
- Out-of-bounds memory access with multiple CanvasRenderers under a Canvas when using Mesh API
- Inspector tries to access file after it was deleted when the file was locked in Inspector window
- Changing Transform values in Search window Inspector loses focus while dragging and stopping mouse without releasing dragging action
- Saving changes on the dirty VFX Graph during the Play mode throws "The referenced script (Unknown) on this Behaviour is missing!" warnings
- VFX Graph Debug Info overlaps the "Initialize" block debug info by default
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.