05-04-2023, 04:26 AM
I also had 1 follow up question regarding building in between points. I know you suggested calculating the distance but I'm having trouble knowing how I'd limit it.
I'm simply trying to make it so that for the size of my placed object (in this case its 1 unit) dont build anything at the start and end node of a segment.
I tried figuring out how to take the Distance and subtract .5f (half a unit) from it, and then converting that into a localDistance for the segments but I'm having trouble getting it correct.
It seems the generation spawns stuff starting from the first node, to the next node. Ideally I'm trying to find a way to almost essentially generate it from the center, outward to each point. However I don't really need that, I just need to make sure the start and end points don't create anything within half a unit from each point.
I provided an image below of what I'm trying to do.
Each point is 1 unit, and then every block placed between the segment is 1 unit. I need them to fit between the points as best they can. This way the desctruction system can have towers and walls break without any intersections.
I'm simply trying to make it so that for the size of my placed object (in this case its 1 unit) dont build anything at the start and end node of a segment.
I tried figuring out how to take the Distance and subtract .5f (half a unit) from it, and then converting that into a localDistance for the segments but I'm having trouble getting it correct.
It seems the generation spawns stuff starting from the first node, to the next node. Ideally I'm trying to find a way to almost essentially generate it from the center, outward to each point. However I don't really need that, I just need to make sure the start and end points don't create anything within half a unit from each point.
I provided an image below of what I'm trying to do.
Each point is 1 unit, and then every block placed between the segment is 1 unit. I need them to fit between the points as best they can. This way the desctruction system can have towers and walls break without any intersections.