Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
smooth connection of two splines.
#5
Hi,
Here is the relevant part of the code I send to Lukango

Code:
//Refresh splines to have the tangent information available and up to date
lastSpline.Refresh();
newSpline.Refresh();

var lastTangent = lastSpline.transform.TransformDirection(lastSpline.GetTangent(1));
var firstTangent = newSpline.transform.TransformDirection(newSpline.GetTangent(0));
//rotate the newSpline so that its first tangent aligns with lastSpline's last tangent
newSpline.transform.rotation = newSpline.transform.rotation * Quaternion.FromToRotation(firstTangent, lastTangent);

Is it clear to you?
Have a nice day
Available for freelance work, feel free to reach out: toolbuddy.net
Please consider leaving a review for Curvy, this helps immensely. Thank you.
Reply


Messages In This Thread
smooth connection of two splines. - by Lukango - 01-29-2019, 02:07 PM
RE: smooth connection of two splines. - by _Aka_ - 01-29-2019, 02:49 PM
RE: smooth connection of two splines. - by _Aka_ - 01-30-2019, 12:55 PM
RE: smooth connection of two splines. - by _Aka_ - 09-11-2019, 10:13 PM
RE: smooth connection of two splines. - by _Aka_ - 09-16-2019, 01:35 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
Lightbulb Junction & Connection Navigation System Design SAMYTHEBIGJUICY 6 3,458 03-25-2026, 10:10 PM
Last Post: _Aka_
  Bezier subdevision not smooth (sometimes) Kapistijn 1 483 02-08-2026, 08:40 PM
Last Post: _Aka_
  Connections Between Opposing Splines lockiidraws 1 580 12-04-2025, 02:14 PM
Last Post: _Aka_
  Spawn at start/ end of splines rickgplus 4 2,873 03-21-2025, 12:34 PM
Last Post: _Aka_

Forum Jump: