I am busy trying to create a spline based railroad track.
Although is is almost working perfect, there is a small issue I cant get rid of.
The problem is that the tracks to not always align with the clamps on the track.
Maybe someone has an idea on how to address this…
Here is the setup:
The clamp mesh:
And the track mesh:
The track is constructed in two passes.
First, the bar elements are laid out, then the tracks are added.
The bars are placed equidistant according to the BarSpacing variable, which is exposed.
The tracks elements are placed as spline meshes almost in the same manner. The length of each spline mesh segment is set by the TrackLength variable, which is also public.
On a straight track, it works perfectly, but when it gets curvy, this happens:
Look almost right, right?
However, this is a closer view from the other side:
As you can see, the tracks do not follow the clamps in curves…
When the bar spacing is drastically reduced, the misalignment is showing quite nicely:
Am I missing something here that could be done to make the tracks follow the clamp better?
Is there something wrong with my component rotations?
Any help is appreciated