GridPlacer: Highly-featured module for part placement, rotation, and snapping to grid

Grid Placer

In many Roblox games there is a need to give the player a tool for placing objects such as buildings, units, furniture, or voxels. There are many tutorials for how to get the 3D position of the player’s mouse and directly place an object at this point. This is sometimes enough for a purely uniform grid-based building system similar to Minecraft. Usually however, there are several features the developer wants that are much more difficult to implement, such as:

  • Alignment of the placed part to match the surface the player is mousing over
  • Modification of the grid used for snapping so that the placed part is always flush with the target surface
  • Consistent rotation of the part on the same surface so the player does not need to set the rotation more than once per surface placed on.
  • Alignment with curved surfaces such as cylinders with equivalent angle-based snapping in the direction of curve.

I’m publishing this module, which is a core useful component of a much more powerful all-in-one building placement system I’m working on called ProtoFabriz. I wanted to get this out sooner because I see questions on Scripting Help almost daily asking for feature’s I’ve already finished. I hope this finds a lot of use in people’s games. I wouldn’t wish this kind of vector math problem on anyone!

Get the module: Grid Placer - Roblox
External documentation: GridPlacer_User_Manual.pdf

22 Likes

This is very neat! Could you give a tutorial or an example of how it would be set up?

2 Likes

Here is an example use case:

2 Likes

Alright, I’ll try that. Thanks!

1 Like

Alr so I just tested out the Jack model and that wasn’t really what I was looking for, it is nice though. I was just looking at how you would set up the model so you could place down objects and stuff

1 Like

I’m working on a version of that now and I didn’t want to stop to make a separate version as a demo. It will be out eventually.

1 Like

Does this have mobile & gamepad support?

It takes a raycast result and doesn’t care where you get that from, so it supports mobile and gamepad if your input script does.

2 Likes

Thank you for this module!
Are you also planning on releasing the ProtoFabriz to the public once it’s ready?
It sounds really interesting.

Yeah that will be released at some point. A lot of things are changing right now so I don’t know how long it will be.

1 Like

I understand.
Building great things takes time. There’s not many (if any) modern and complete building systems available so this will be greatly appreciated once it’s ready. Once again thank you for your hard work.

3 Likes

This is great, but my part is sideways and don’t know how to fix it. I also don’t want the part to looks towards whatever the instance of the raycast result is.
image

Where have you placed the handle?