Relative Content

Tag Archive for c#unity-game-enginemonogame

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: