Spline tangent problem

This problem has been discussed for a while, but there’s unfortunately no solution.

If I create a spline that bends beyond the vertical, the tangent gets inverted. I have tried to rotate the spline points to 180 degrees, but it just gets mangled up (see below) and becomes even weirder.

The images below are created using only the spline editor, no blueprints. I’m sorry, but this is clearly a bug, there’s no logical reason to have this happen in a spline. If I want this, I should be able to rotate the spline point myself. Take any 3D editor that uses splines and you will not find this behavior.

Is there going to be a fix for this?

I had the exact same issue when I implemented a spline intro camera system for our game. Afterwards I found out, that there is already such a camera included in the engine files. Sadly that one has the same problem and I wasn’t able to resolve it yet.

As a workaround I used static rotation unrelated to the spline, which of course does not always work.

Here is a screenshot that shows the issue even better:

123392-cameratrack.jpg

1 Like

Yeah, I know… This happens because when the splines passes the vertical, its tangent gets flipped.
Frankly, it doesn’t make any sense… I don’t know how it stayed like this all this time…

Hi Anderi,

Have you tried Default Up Vector? Using that combined with rotating the spline points, you can achieve about any shape without the tangents becoming flipped.

Let me know if this helps or not.

Cheers,

TJ

Thanks for the answer! I’m playing around with the Up Vector, but still can’t manage to obtain what you show above.
Can you please share the blueprint?

Also, it would be nice if you could provide a blueprint also for this problem:

Although, I don’t see how it could be solved…
I’ve been at this for a few hours already and cannot seem to find an answer. Why is it so complicated to obtain something that we find already implemented in 3D modeling software?
Hope I don’t come off as arrogant, but I’m really frustrated with this…

Thanks a lot for this solution! However, it doesn’t solve every situation.

Here’s a case that doesn’t work:

When the tangents are perpendicular to the up vector, I still get artifacts.

I know that I should manipulate the Up Vector in each spline point, but I don’t know how. Maybe some king of interporlation of the tangent between points? Vector math is not my strong point.

I need a solution for this to work dynamically, independently of the direction in which I manipulate each spline point.

Here’s the project file with the example, I just modified yours:
[link text][2]

Since the spline data lives in the level, I attached a blank project that opens to the spline I created. To make a spline similar to the setup you pictured above; I didn’t need to manipulate the rotation of any of the splines in the editor, I just adjusted the Spline Up Vector.link text

By mistake, I didn’t reply directly to your post. Please check my comment below. Thanks!

Most any shape can be achieved but it does take some playing around. And the position of the spline points are important when placed directly above and below. You might need to move them apart a little to get the desired orientation.

Here is the spline you created tweaked to be as level as possible. I also made the Scale Visualization Width smaller, it can sometimes be misleading and look wonky when it’s to large.

Project

Thanks a lot for this. I really appreciate it.
Unfortunately, I still think this should not be the default behaviour. I’m sorry, but I can’t stress this enough, splines are one of the most important features that sets Unreal Engine apart from other engines.
And no, I cannot move the spline points slightly apart from the vertical. When a wall has to be vertical, then it has to be, otherwise, it will ruin the game mechanics.
Can you please file this as a bug in the bug tracker? Thanks!

Thank you for the feedback. We will take this into consideration. Just please keep in mind that the spline actor/component does have limitations and there is no guarantee of implemented…

I understand. Thanks again.

Cant get a project with a spline. Can you reupload it?

I know this problem. This is real an engine mistake. I want to fix it or make a new one, but I haven’t started.

1 Like