You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are two major issues with road placement at this point.
Building-Road Interactions
Currently, it is possible that a building will be spawned right on top of a road. There are two reasons for this. The first is that settlements seem to be expanding beyond the limits set in settlementMaxRadius. This means that the roads which should have been outside the city limits would eventually come inside.
The second problem is that the check for obstructions while placing buildings doesn't work for roads. The check is in SettlementEntityManagerhere and the main cause would most probably be in the isNotIntersecting function from ParcelListhere.
Save Road Heights to RoadSegments
Each RoadSegment should have a height stored at which the segment will be laid down. This height should depend on the surface height in the world. Currently this height is a constant value set here. This leads to trouble with roads on mountains as roads create a chasm as they go through a mountain. Try looking at the flatten function in Construction to see if it helps to find surface heights.
The text was updated successfully, but these errors were encountered:
This involves adding dynamic road creation with generators found within the static cities module. The main task is to transform the facet based road creation, which creates roads at world generation, into one which places roads during playtime.
A similar technique used for the transformation of facet based building creation can be applied here.
Suggested steps are as followed:
Create rules for what cities should be connected. A good approach can also be found in the StaticCities module here
Create a road object containing all the road segments akin to the StaticCities road creation.
Create a rasterizer which does the same stuff as the original but uses the BufferRasterTarget for actual block placement
It probably makes the most sense to save the road object to the corresponding city entity to which it connects. This will allow to check for overlap when placing new buildings/stuff.
There are two major issues with road placement at this point.
Building-Road Interactions
Currently, it is possible that a building will be spawned right on top of a road. There are two reasons for this. The first is that settlements seem to be expanding beyond the limits set in
settlementMaxRadius
. This means that the roads which should have been outside the city limits would eventually come inside.The second problem is that the check for obstructions while placing buildings doesn't work for roads. The check is in
SettlementEntityManager
here and the main cause would most probably be in theisNotIntersecting
function fromParcelList
here.Save Road Heights to RoadSegments
Each
RoadSegment
should have a height stored at which the segment will be laid down. This height should depend on the surface height in the world. Currently this height is a constant value set here. This leads to trouble with roads on mountains as roads create a chasm as they go through a mountain. Try looking at theflatten
function inConstruction
to see if it helps to find surface heights.The text was updated successfully, but these errors were encountered: