Author Topic: Terrain cell selection accuracy issue  (Read 53 times)

Michael Aganier

  • Guest
Terrain cell selection accuracy issue
« on: November 15, 2020, 08:12:53 PM »
I put the terrain grid system on a terrain for testing.

When I move my mouse to select cells, the accuracy is not very good. My mouse can still be in the middle of a cell and the selection will change to another cell.



How can I fix this?

Michael Aganier

  • Guest
Re: Terrain cell selection accuracy issue
« Reply #1 on: November 15, 2020, 11:32:16 PM »
When I click play, my map doesn't have a grid on it.



When I open the inspector while the game is running, and I click the 'Redraw' button,



suddenly, I can see the grid on top of my terrain again



and the mouse cell selection is working.

Why do I have to click the redraw button for the grid to work?
Is there a way to tell the grid system to redraw the grid automatically so that it works when I click play?

Michael Aganier

  • Guest
Re: Terrain cell selection accuracy issue
« Reply #2 on: November 16, 2020, 12:20:45 AM »
To clarify, I can see the grid in the editor.



It's only when I click play that it disappears and I have to click "Redraw" for it to come back.

Kronnect

  • Administrator
  • Hero Member
  • *****
  • Posts: 6345
    • View Profile
Re: Terrain cell selection accuracy issue
« Reply #3 on: November 16, 2020, 12:40:15 PM »
Are you generating the grid somehow at start?
Could you please provide a copy of the scene by pm?
Thank you.

Michael Aganier

  • Guest
Re: Terrain cell selection accuracy issue
« Reply #4 on: November 17, 2020, 12:20:03 AM »
Solved it. The issue was caused by using the Enter Play Mode option. To use Enter Play Mode option with TGS, I had to call Redraw() on my TGS grid on game start.