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)
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
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
  Curvy Line Renderer for UI Spline? gekido 3 6 04-04-2024, 12:56 PM
Last Post: _Aka_
  Get position of all control points for a spline gekido 1 6 03-28-2024, 10:08 PM
Last Post: _Aka_
Bug Changing spline connection in inspector causes splines to revert to defaults lacota 3 6 03-18-2024, 07:55 PM
Last Post: _Aka_
  GO can't fit end of the spline GameDeveloperek4123 3 14 03-04-2024, 11:06 AM
Last Post: _Aka_

Forum Jump: