I want to make RTS streets that you can place dynamically. I’m using splines for the path. If you want to see what I want to create you can take a look at Manor Lords (https://youtu.be/d2mW8fmakKA?t=25).
Now my question is:
How do I build the streets along the spline?
I think there are 2 ways to create the streets:
Create a SplineMeshComponent that has the street material and hitbox on it. I would prefer this solution, but my problem here is that the spline doesn’t match the height of the terrain.
So what would be the solution for this?
Just paint the terrain. But I don’t like this solution a lot. Because I think it is a problem paint a direction and I have to repaint, when I delete the streets and have to match the environment texture.
Hope to get some good ideas on that. Thanks in advance!
assuming that, then a voxel plugin of some type.
with that, you probably just sculpt the terrain to conform to the road / implement a landscaping system.
its not the easiest thing to do. if you have no experience with the engine start somewhere else.
If you have a fair amount of experience, then you just need to figure out the right pathway to modify collision at runtime.
No, the few I tried back in the day aren’t particularly efficient.
Managing collision at runtime is not exactly an easy task.
in short, You’d have to use the built in engine stuff.
luckily for you, with .26 they added a lot of procedural things. You can probably find a tutorial on procedural mesh generation and collisions.
As far as the game goes,
They probably have a custom landscape system with an appropriate toolset they built over time.
The game’s been in my wishlist for over a year… and probably in development for at least a year before that.
The spline collision has nothing to do with how to manipulate collision at runtime for a custom terrain, or how to edit a terrain shape at runtime.
You can get the spline to snap to the terrain anytime with a simple downward line trace that starts from way up above the terrain on the visibility channel.
as any other linetrace, it can detect anything, including other actors (not the landscape) so that you can implement some kind of snapping.