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"

Get Tangent At Distance Along Spline Affected by Length

I'm using a Spline Component to create a road network.

In order to keep the road pieces from stretching/squashing, I've used "GetTangentAtDistanceAlongSpline" to get the start/end tangents of each piece.

However when I move the points of the spline too far apart, the tangents become distorted. The distortion happens when the distance between two spline points is greater than the length of one length of road.

alt text

When the distance between two points is less than one length, the tangent seems to have less of an effect on any spline mesh created with it.

alt text

Product Version: UE 4.20
Tags:
more ▼

asked Sep 15 '18 at 04:00 PM in Blueprint Scripting

avatar image

Mistress Lillith
221 4 7 18

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

1 answer: sort voted first

Found a workaround.

It seems the length of the tangent is increased as the distance between points increases. (I'm not sure if this is intended behaviour)

Basically I just normalized the tangent vector and multiply it by the length of one road unit.

alt text

fix.png (108.6 kB)
more ▼

answered Sep 15 '18 at 09:31 PM

avatar image

Mistress Lillith
221 4 7 18

avatar image RVillani Apr 02 '19 at 02:49 PM

Thank you!! You just saved me hours of guess work and debugging! ♥

avatar image Arty-McLabin Apr 13 '19 at 10:47 AM

thanks man, that helped me too!

(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