04-29-2023, 01:42 AM
Like the title suggests, I'm trying to create an in game spline block placement editor.
The general idea is to allow creation of walls and towers. Towers would be placed where spline nodes are, while walls would fill the spaces between.
You can draw a line segment with a start and end tower point on the map. When close to another existing wall, it can snap. If your close to a node, it'll merge the two lines together, if your not close enough, it'll just attach the wall to that position.
The catch is that I need to allow both the walls to spawn as their own objects to allow for destruction. (basically each wall is a block / segment that can be destroyed.)
I also ideally want the walls to be able to curve towards the spline if needed.
In general the castle walls will be straight, but I do want to allow the ability to curve the walls by click the wall segment and dragging out.
Another side question was if it is possible to add junctions (to connect multiple different splines) and is it possible for a spline to connect to itself (for something like a figure 8 railroad track)
I've been having so much trouble using different spline apis, trying to hack / write them to work for my needs and its just been so frustrating. My most recent attempt was the closest but it was glitchy and its performance wasn't good at all.
I proved an image of what I'm trying to achieve.
Is it possible to do what I want with this, and is it complicated to pull off? I've been so demoralized this past month and a half, and I'm desperate for a better solution.
The general idea is to allow creation of walls and towers. Towers would be placed where spline nodes are, while walls would fill the spaces between.
You can draw a line segment with a start and end tower point on the map. When close to another existing wall, it can snap. If your close to a node, it'll merge the two lines together, if your not close enough, it'll just attach the wall to that position.
The catch is that I need to allow both the walls to spawn as their own objects to allow for destruction. (basically each wall is a block / segment that can be destroyed.)
I also ideally want the walls to be able to curve towards the spline if needed.
In general the castle walls will be straight, but I do want to allow the ability to curve the walls by click the wall segment and dragging out.
Another side question was if it is possible to add junctions (to connect multiple different splines) and is it possible for a spline to connect to itself (for something like a figure 8 railroad track)
I've been having so much trouble using different spline apis, trying to hack / write them to work for my needs and its just been so frustrating. My most recent attempt was the closest but it was glitchy and its performance wasn't good at all.
I proved an image of what I'm trying to achieve.
Is it possible to do what I want with this, and is it complicated to pull off? I've been so demoralized this past month and a half, and I'm desperate for a better solution.