How would I be able to make a wall rendering system, like the one in the video? I have been struggling for like 5 days in a row now, still nothing…
Btw. video by Sleitnick (CrazyMan32)
How would I be able to make a wall rendering system, like the one in the video? I have been struggling for like 5 days in a row now, still nothing…
Btw. video by Sleitnick (CrazyMan32)
A vertex is any place where two or more walls intersect. An edge is a wall connecting two vertices. With this in mind:
When a player clicks, constrain the position to the grid. Look up the vertex and the edge on the position. If there is no vertex on the position, create one with the clicked position. Now, if the player has not previously selected a vertex, mark the current vertex for the second input. Otherwise, we move on to creating an edge between the previously marked vertex and the current one.
To create an edge between two vertices, determine if the edge intersects any other edges in your edge set. If the new edge does not intersect anything, then add the new vertices to the vertex set (0, 1, or 2 will be added depending on how many of the vertices in the new edge already existed). Then, add the new edge. Otherwise, we move on to the intersection case.
For each intersected edge (line segment intersection test), determine whether they are parallel or not and the intersection points. Sort the intersection results in order of increasing distance from the start point of the new edge. Then, iterate over the intersected edges and do the following:
For subtraction, the new edge will be parallel and coincident on the edges to be cut. Determine the new edges from each cut by following a similar process.
After all that, write a function to resize a wall between two points (i.e. using a part with textures, stretching a model, or something else) and draw the edges as they are added.
Quick Example:
Very good response, but I think slightly over-engineered
The info about placement is good, but I think the intersection tests and everything are sort of unnecessary, the video looks like it just keeps everything on a grid.
Hard to know what exactly OP is looking for though!
Do you maybe know another way of doing it?
I know that this doesnt have the grid but I figured at least give you this. The past few days i’ve worked on a building system: Here it is if you want to check it out:
BuildModeDemo.obj (1.5 KB)
(You can fly by double jump also you place the first wall, then second and it then in a few seconds fills it in for you just like in the video)
Bro thats an obj file… Could you plz export it in rbxm?
Bro plz, can you export it in rbxm or something else, thats not an object?
Here: Building System Demo (DevForum) - Roblox
You should have access to it let me know if you don’t
Here’s Something I made to test it:
Note that you can rotate the part by using r
Bro, why using auto fill? Im trying to check when a room is created, not making an auto fill… but thanks anyway
I will keep working on it to make it “stretch” just like in the video
Thanks, hope it goes well!
When do you think it will be done?
Another update bois same game link:
You have 2 options this time the “Auto Fill” or the “Stretching”! Hope Its good!
Again bro, Im trying to make a room detection system… Not the entire build mode…
Whenever 3 walls, 4 walls, triangles etc is being connected to eachother, that means a room have been created…
@domboss37 is answering the question you asked in this thread.
You’re confusing this thread for your other thread, where you do ask about how to make a room:
Bro, im not trying to make a room, im trying to make a system, that checks whenever a type of “room” have been created, it could be any shape. A room is a room, when all the edges is closed, aka. enclosed…
I understand that. But that was in a different thread than the one we’re currently in.
If you no longer need this thread, which is asking:
Then close it!