Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Working with Connections
#2
Hi

1- You can get all the connections using FindObjectsOfType (a unity method). Then, for each spline, get the yourConnection.ControlPointsList, and for each of the control points, you can get the spline from yourControlPoint.Spline
As a suggestion, using LINQ can help you make requests easily, with few code. Some requests can allocate memory though, so profile them in critical paths: https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/concepts/linq/

2) Get the tf on the desired spline using yourSpline.GetNearestPointTF. Then set that TF as an input for yourSplineController.RelativePosition

Have a nice day
Please consider leaving a review for Curvy. This will help a lot keeping Curvy relevant in the eyes of the Asset Store algorithm.
Reply


Messages In This Thread
Working with Connections - by burn0815 - 05-27-2021, 06:32 PM
RE: Working with Connections - by _Aka_ - 05-27-2021, 08:33 PM
RE: Working with Connections - by burn0815 - 05-27-2021, 08:51 PM
RE: Working with Connections - by _Aka_ - 05-28-2021, 11:24 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Connections Problem Juton 3 16 03-06-2024, 10:41 AM
Last Post: _Aka_
Bug Issues when working with in-place prefabs Sacryn 4 6 02-27-2024, 04:08 PM
Last Post: _Aka_
  Are connections pooled? Lupos 1 3 05-09-2023, 09:18 AM
Last Post: _Aka_
  How to merge intersecting meshes at spline connections? Reign_of_Light 2 6 03-20-2023, 08:36 AM
Last Post: Reign_of_Light

Forum Jump: