I am building a railroad simulation:
The simulation is based on a spline around which everything revolves. One of the problems I have is turning the rails to the left or right, although I can do it manually that way:
The curve I get does not have a uniform curve angle (it does in real life, except in some special cases).
So my question is: Suppose I have a straight spline with seven vertices. I need to rotate vertices number 3, 4 and 5 by $5°$ each in the Z axis. The rest will stay aligned with the changes.
Is this possible?
Example:
I also need the ability to control which vertices I rotate and in which dimensions they rotate.
For example, is it possible to make outputs with the ID of the vertices where the curvature starts and where it ends?