# Creating a grid

**URL:** <https://forums.unrealengine.com/t/creating-a-grid/386731>\
**Category:** C++\
**Tags:** projection-matrix, unreal-engine, grid, CPP, question\
**Created:** [March 2, 2017, 12:34pm UTC](https://forums.unrealengine.com/t/creating-a-grid/386731 "2017-03-02T12:34:24Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kn0bbulo](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@kn0bbulo](https://forums.unrealengine.com/u/kn0bbulo)\
**Post date:** [March 2, 2017, 12:34pm UTC](https://forums.unrealengine.com/t/creating-a-grid/386731/1 "2017-03-02T12:34:24Z")

</div>

I need to create a simple square-block grid.  
Since I’m still a newbie, my first thought was to make a large square with a small Z scale and then add several smaller squares inside and somehow code those little squares so that they are used as part of a matrix.

Of course this is beyond terrible if not straightforward not doable.

Looking out for answers I found that most of people start creating a “grid material” and then attach it to a square but still I don’t get how I code this large square so that it’s considered a matrix on which I can place other pawns.

I only need some small suggestions so that I can start making some research on my own towards the right solution, especially because most of the times a find tutorials based on Blueprints and I’m far more into C++ coding.

Thanks a lot.

---

<div class="post-metadata">

**Author:** ![hectorgrey](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@hectorgrey](https://forums.unrealengine.com/u/hectorgrey)\
**Post date:** [July 25, 2017, 4:52pm UTC](https://forums.unrealengine.com/t/creating-a-grid/386731/2 "2017-07-25T16:52:40Z")

</div>

It’s still worth taking a look at the blueprint tutorials - most of what you’ll find won’t be massively difficult to translate into C++, just because most of it will be relatively simple. You’ll need to take a look at the documentation to see how the templates are set up, but it shouldn’t be too difficult - the logic will all be the same…
