I’ve been pushing off making a forum post for basically a year now since there are many posts asking this but none have gotten answers that really apply to my issue. To sum it all up, I need help making a grid-based building system that can support both blocks and models of any size based of what the player is placing it on (either their baseplate or a block in their baseplate.)
Currently, my game Build to Survive the Zombies has a building system that was taped up from different developer posts and whatnot and works just well enough but I need help making a system that’s better.
So again to be clear about what I need help for: I need help making a grid placement system that can support any model size that is also based on what you are placing off of (like a player-specific baseplate or a block that you have already placed down in the baseplate)
Anything would really help, sorry for the lengthy request.
One day, a friend of mine asked me if I could make a placement system like Adopt Me.
I had never done one before, so I joined into the Adopt me game, and started moving furniture around, to see if I could get an idea on how they were doing it.
After a few hours I came up with a simple furniture placement system.
I added the ability to have some objects (such as a table) allow for things to be placed on top of it.
I also added the ability to place things on angles, such as a ramp, or a tilted wall.
I also added the ability to snap to a grid, along with the placement being able to be replicated continuously to the server, or only after the item was in its final position, or not replicated to the server at all.
My friend didn’t understand the code, and it was too much to try and teach him.
I can post the project file, but you will have to understand it yourself. I will find it and see if I can post it, and maybe give a few pointers on how to use it.
Once you run the game.
You first need to touch the greed door to claim the room, it only allows you to place things if you own the base.
Then you can click the Edit button to turn editing on or off.
If edit is OFF, you can click things freely.
If edit is ON, when you click something you are allowed to move it.
There is a button for Grid side, if you want it to snap to a grid.
Small is .2 studs, and Large is 1 stud.
Respect normal determines if we will use the normal data of the surface or not in placement.
The table and shelf allow for things to be placed on their surface.