Grid Creation Systems

Oh alright, so you essentially want to create a hex grid on a sphere. In that case, I think it’s going to be a lot more work than just arranging multiple circles. I had looked into it when first creating this system, but then realized it’d be too much work and I’d have to raise the price of the package by a lot just for that particular setup. Here are a couple of resources that helped me back then while researching on the topic:

https://www.redblobgames.com/x/1640-hexagon-tiling-of-sphere/

Also, IIRC I believe it’s impossible to create a perfect hex grid. You’ll need to also place a few pentagons (like the separate colors on a football) in there somewhere to make it work. If there are lots of hexes like in Rimworld, most people are not gonna notice it though. You can check out the developer mention it here (timestamped):

hello, i want to ask do we have a function to call the closest point in grid system?

There is no such function at the moment. Which type of grid configuration are we talking about here? As in basic square grid or hex, etc.

well im working on a space base building game i need a cuboid grid system for that, is it possible to get nearest location to snap the building on that point

Well, I’m flooded with work this week. I can look into how that can be implemented and let you know early next week.

1 Like

anyway you could still asnwer mrbearts question? “well im working on a space base building game i need a cuboid grid system for that, is it possible to get nearest location to snap the building on that point”

would like to know if able to use to make a unified grid system with mutliple block sizes that connect to the grid example being a 25cm block being the smallest and the bigger blocks take 2-8 more spaces etc

regards

Hey there, as of now, Snap to Grid functionality is only added for the default 2D grid. There is no support for building placements or multi size tests.

Regarding using snap to grid on the 3D cuboid grid, could you provide some example scenario/video or more details about how the player interacts with this grid space?

1 Like

One of my ideas is how stormworks build and rescue building on grid works https://youtu.be/-SZb7jHrlh0?si=okzND9mP-G1D8x_M

Starship evo example

Hope this help visualise it

Alright, got it. I’ll add a demo level for the 3d grid with this system. This week is a bit hectic, but I should be able to publish an update next week.

Hey, I got it working. Will push the update after cleaning up the blueprints. Should be hopefully available on Fab by the day after tomorrow.

GridCreationSystems-UnrealEditor2025-01-0617-44-10-ezgif.com-optimize

Edit: The new update has gone live on the marketplace. The project now has a sample map that demonstrates a snap to grid system for the cuboid grid.

You can find the new demo map Map_3DGridInteraction in the Map >> Extras folder.

The blueprint logic for the snap to grid system can be found in Blueprints >> Extras >> CuboidGridInteraction:

  1. BP_GridCreator_CGI is a custom grid generator created for this example and is derived from the basic Cuboid grid generator.
  2. BP_HoloCube is a placeholder actor that is used for demonstrating the grid snapping in 3D.
  3. BP_PlayerController_CGI contains the execution flow for calling the snap to grid system and updating the holocube positions at runtime.
  4. BP_CuboidGridPtCalculator is a custom actor component that is used for calculating the nearest grid point for the targeted location.