x

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"

Reverse spline point order

Hello, all.

I cannot find a way to reverse the sequence of points comprising a spline.

I have one spline that a vehicle follows to get from A to B, using a timeline. I copied that spline for the return journey and moved some of the points around as the vehicle needs to follow a slightly different path on the way back (i.e. going around the parking area and going on the order side of the road).

The problem is that when the return journey begins, the vehicle jumps across the map to start at the wrong end of the spline. Changing the timeline to go from 1 to 0 instead of 0 to 1 makes the vehicle start at the right end but makes it go backward.

I can't for the life of me find any way to change the order of the points. In Cinema 4D where I created the spline (and then painstakingly copied and pasted the point positions and tangents to a spline component as there's no sensible way to import a spline to UE4), you just right click and pick 'reverse sequence'. Simple.

Am I going to have to start a new spline component and tediously copy and paste all the point positions and tangents, but in reverse order? There are a number of different routes, each with their own return journey. It's going to be hideous to have to do this for all of them.

Thanks.

Product Version: UE 4.18
Tags:
more ▼

asked Jan 31 '18 at 06:51 PM in Using UE4

avatar image

Bob3DGames
114 4 11 16

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

1 answer: sort voted first

You can have one spline which is the user spline that you modify in the viewport (or construct from data).

In the BP logic you would simply add new spline component(s), this could also be dynamic if you need n splines. Think about putting in an integer variable: "ReverseAnimationAtSplinePoint". What it actually does is creates two splines from your editor spline and meets at the same point, one reversed.

more ▼

answered Jan 05 '19 at 09:39 PM

avatar image

Razivoid
76 1 5 5

avatar image Bob3DGames Jan 06 '19 at 10:40 AM

Thanks for the suggestion. However, writing the code to create a new spline isn't any less tedious than manually creating the spline. I'd still spend the same amount of time typing in coordinate values.

avatar image Razivoid Jan 06 '19 at 02:02 PM

The issue sounds like it's coming from your workflow, not the tools. If you can import the points/scene in the first place (automatically) then you can create a reusable function that reverses a spline easily enough in the editor or at runtime. Let me know if you want me to go through this with you

avatar image Bob3DGames Jan 06 '19 at 07:03 PM

The spline wasn't imported, I drew it in the editor. I then copied it and moved the points slightly as the return journey is a slightly different shape.

If I programmatically create the new spline by copying the first I'd need to type all the new coordinates of the points into that code, which gives me nothing I don't already have to do to manually to create a new spline in reverse order in the editor (otherwise where would the new points' locations come from?).

If it's possible to reverse the points in the editor - even if I have to write some code to do it - so that I can then move the points manually to give the return path that would be useful.

Are you saying it's possible to do that?

Thanks.

(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