Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Spline - common loop problem

Hey guys. Got the same problem as some others around here when trying to loop with a spline.

UE 4.12

I want to draw splines at runtime, that works nicely. But when looping, I get the rotation problem like others do.

https://answers.unrealengine.com/questions/109798/splinemesh-bug-when-doing-looping.html https://answers.unrealengine.com/questions/97064/spline-mesh-and-loops.html

In these threads it is always mentioned to adjust the Spline Up Dir, what somewhat seems to work on these guys. In my case, changing the Spline Up Dir does not seem to have any effect. It´s always the upwars loop that is causing the rotation problem, no matter what Up Dir is set on the spline. Spline Meshes are created on the go when the distance between two Points is to long. A new point is inserted and a Spline Mesh applied.

Here the spline point tangents are set, the spline updated and start and end of every spline mesh is set according to its spline points. alt text

and this is what it looks with debug draw of spline point up vector, ugly rotation at loop still existing alt text

My solution to that problem would be changing the roll of the spline mesh to counter the unwanted spline rotation. But the amount of roll to apply depends on the direction the spline is drawn and the tangent length of the points. Seems impossible to finger out when and what amount of roll to apply to a mesh.

A working example would be nice, there are enough that are in need of one. appreciate any help you can give.

best regards

Product Version: UE 4.12
blueprint.jpg (259.9 kB)
splinedraw.jpg (207.6 kB)
more ▼

asked Aug 11 '16 at 08:40 PM in Using UE4

avatar image

23 6 6 10

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

Oook, found my problem with "SplineUpDir".

In order to make it work, you would need to set the "SplineUpDir" of an "SplineMeshComponent". NOT the "SplineUpVector" of the "Spline" as shone above.

Would be nice of Unreal would change this to "SplineMeshComponent"->"SplineMeshUpDir". Would make it more understandable.

more ▼

answered Aug 17 '16 at 01:47 PM

avatar image

23 6 6 10

avatar image Andrei Branescu Dec 06 '16 at 09:56 PM

This still doesn't work if the same Spline Mesh Component is bent twice. So it actually limits the use to only small meshes.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question