Download

Parallel Splines

I’ve been trying to create parallel spline in blueprint, I was able to create parallel spline points, but don’t know how to correctly set the tangents, because spline sections between points are not parallel (white and pink line in picture 1) to the root spline. How can I fix it, please? Thank you for your help;)

It does work, it’s just Unreal is weird about it.
If you set the spline point or the tangent via Blueprint, you’ll need to restart the editor for it to work correctly. I just tested, and it’s still true in 4.16

So in the attached example I have two splines in an actor, on construction SplineA copies the position and tangent info from each point to the points on SplineB. When I first created the actor, it doesn’t work, but restart and it works perfectly, you can move the points on A in real time and have them update on B.
Try it out for yourself, it’s a pain, but it can be worked around.

Hope that helps,
Dave

Thank you very much Dave, for example and help. Unfortunately, it does not work for me as I need. Excuse me, but English is not my first language, so maybe I’ve explained something incorrectly. What I would like to achieve is something like green lines in this picture. I would like to create spline with offset so that I can use it to create spline mesh (crash barriers, walls, railings, etc.). In my first post, white spline is road, and pink spline is for crash barriers.

Thank you again, appreciate it.

No problem, that makes sense.
In my example I’m copying the tangents and locations exactly, so to get the green lines as you want, you’d need to manually generate the locations and tangents.

Yes, that’s what I’m trying to do. I the blueprint in the first post, I’ve managed to calculate correct position of points, the only thing left are tangents. Currently, the tangent of “Spline” is connected directly to “Spline1”, but I guess I need to calculate the correct tangent according to the offset. I’ve found something about calculating normal of tangent, but I’ll be honest, this kind of math is difficult for me to understand - answer from Joltz at link: https://www.reddit.com/r/unrealengine/comments/529wa8/question_spline_location_offset/

So uhm i know this is an old thread but I’ve spend several hours trying to get a normalized tangent without any success, my mathematical skills are in my opinion low but i am slowly learning and catching back up, I think I understand the equation but haven’t been able to apply it properly, any help would be so much appreciated!

You’ve probably solved this issue by now, bit if not, this post explains the math… it’s quite simple:

https://answers.unrealengine.com/questions/319813/parallel-splines.html

That’s not parallel. Not same distance everywhere

Instead of building another spline, just sample the transform from the “center” spline and apply it to a “right” or “left” vector at some distance from the center.

Hi guys, I know this is an old post but I have been all over this problem for a week and a half now and could not find a way to implement quadratic Bezier curve extrusion solution.
Do any of you have the solution just laying around by any chance and willing to share it?

In addition, I’m adding some screenshots of my implementation and result.


The extruded control polygon looks and behaves fine, though the actual curve doesn’t seem to follow its shape.

Here’s how I draw all this colorful stuff:
first I’m setting a curve manually


Then It’s variable setting time

Then I do the math:

Here’s the FindIntersectionPoint function:

And the last step is to set the new points correspondingly:

Lastly, Here’s a variable map so you’ll understand the names :

Thanks in advance :heart: