A referenced tile's GridPosition is inaccurate
by Randy Lutcavich · in Torque X 2D · 07/30/2009 (9:25 pm) · 0 replies
If a breakpoint is used when running a game it is possible to see the GridPosition of a referenced tile but this grid position always shows up as the last tile in a tilemap. It is expected that the accurate grid position of a tile would be stored.
Steps To Reproduce:
1) Create a tilemap
2) Reference a specific tile using PickTile() or GetTileByGridCoords
3) Insert a breakpoint at the reference to that tile and start debugging (F5)
4) Highlight the reference to the tile and press the mini plus button to reveal the GridPosition variable and notice that the GridPosition value is actually the value of the position of the last tile in the tilemap
Expected Results:
For the GridPosition of a referenced tile to be accurate.
This is a major issue specifically when trying to set a new tile over an old tile after finding the grid position using .GridPosition because there does not seem to be a simple alternative.
Steps To Reproduce:
1) Create a tilemap
2) Reference a specific tile using PickTile() or GetTileByGridCoords
3) Insert a breakpoint at the reference to that tile and start debugging (F5)
4) Highlight the reference to the tile and press the mini plus button to reveal the GridPosition variable and notice that the GridPosition value is actually the value of the position of the last tile in the tilemap
Expected Results:
For the GridPosition of a referenced tile to be accurate.
This is a major issue specifically when trying to set a new tile over an old tile after finding the grid position using .GridPosition because there does not seem to be a simple alternative.
About the author