I’m trying to make a custom road generator Spline BP. What i want is for the user (in editor) to be to able toggle on/off a bunch of separate meshes in the one spline BP. So you can toggle , 2 Lane Road, 4 Lane Road, Intersection segment, and left and right Guard Rails, which is what I’m having trouble with. How I want it to work is if road mesh = “2 lane road” set “right guard rail” local offset to X value on the Y axis, if road mesh = "4 lane road"(wider mesh), set “right guard rail” local offset to Y value on the Y axis. I’ve set the offset for the guard rails Using the “Add local offset” node and it works as long as the spline is straight, However it all goes a bit sideways when it gets to the bends.
You can see in the forefront of the above image the guard rail works as intended, however once the road starts to bend the guard rail completely loses it’s orientation relative to the road and spline, even crossing over to the opposite side of the road at one point. The problem also occurs when I move the a spline point in the Z axis as you can see below.
I know this problem can be fixed by moving the mesh in Blender, in my case, to the right location and applying it, then export and import it to UE and make duplicates of the same mesh with different locations applied to to each mesh so they line up with each of my road meshes by default in UE. I’m super OCD about this, I really want to be able to use the one guard rail mesh and just change it’s offset based on the road mesh it’s mated to.
Any help would be greatly appreciated.