unity, quad size scalling and positioning to represent selection box
I need to show a highlighted area on a grid. The grid is just a grid object assigned to a gameobject and represented with shader graph material to visualize grids. The grid part can be ignored for this problem.
unity, quad size scalling and positioning to represent grid selection
I need to show a highlighted area on a grid. The grid is just a grid object assigned to a gameobject and represented with shader graph material to visualize grids. Now to mimic highlighting, I am using a quad since its size scales to exact 1 unit. But I am unsure how to set its position correctly as it is showing some offset. I want to start the quads top left corner to start from mouse position. Here is the code: