Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Syncing UI Spline and Regular 3D Spline
#2
Hi,

1- Splines' control points coordinates are in the local space of the spline. So by using the same local position, and changing the spline's transform, you can have synchronized splines with different scales, rotations and positions. I attached a scene and script doing this. In my script I synchronize only the the control point's positions. I assume that both your splines have already the right setup (the same interpolation type for example), and that you don't modify the handles. If that assumption is false, you can easily add to my script the code that will synchronize the needed properties.

2- You will need to write the code for a simplified runtime editor. I bet there are on the store some assets that already do that. Control points being GameObjects, anything on the store that allows you to move game objects at runtime will do the trick here.

3- Yes, you can have multiple meshes with multiple materials on the same spline. I added to the attached scene a "TubeSetuper" that does that with two materials. You can then enhance that script to handle whatever number of tubes you need.

Keep in mind that both the scripts are just proof of concept, so they are definitely not be the most optimized and error resilient scripts you can get.

Let me know if you still have any other question
Have a nice day


Attached Files
.zip   OilDrilling.zip (Size: 7.97 KB / Downloads: 3)
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
RE: Syncing UI Spline and Regular 3D Spline - by _Aka_ - 03-12-2019, 12:00 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Best way to duplicate a spline with an offset Kapistijn 8 1,273 04-12-2026, 03:18 PM
Last Post: _Aka_
Smile Constant speed along a spline? tfishell 1 642 11-13-2025, 11:32 AM
Last Post: _Aka_
  SplineController Ignores Follow-Up and Chooses Wrong Spline Josenildo 7 4,421 07-29-2025, 09:15 PM
Last Post: _Aka_
  Curvy Line Renderer for UI Spline? gekido 7 6,160 07-13-2025, 07:11 PM
Last Post: _Aka_

Forum Jump: