Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Syncing UI Spline and Regular 3D Spline
#1
Hi, I would like to know how to synchronize the shapes of two splines to be exactly the same?

I briefly went through the docs, but cannot wrap my head around it for my purposes.

In the attached picture, I have pointed out the two spline and where they are. The smaller UI Spline on the right is on a canvas and is user modifiable. The larger 3D spline is positioned as a gameobject on a movable 3D land object to represent the previous UI spline on the 3D model.

I want to do two things with them :

1. The UI Spline can be modified in shape by the user dragging on any of the pink outlined points.
2. The 3D Spline must replicate the shape of the UI Slime once the user has finished dragging the UI spline points.

Questions :

1. What's the best way to sync both the splines? I could easily sync positions of spline waypoints if both were in world space or both in UI space, but here both the splines are in different spaces, one in canvas, one in world space. Hence, I'm unable to comprehend an easy way to translate the positional changes of the waypoints of UI Slime to the 3D slime.

2. How do I go about actually setting up the waypoints to be interactable in the UI Spline on canvas in runtime?

3. Can you point me to the right direction in terms of making the 3D spline look like a coloured tube? Basically the second spline is a 3D tube going underground and needs to look that way. Will I be able to represent the red curve part as well exactly as the UI spline? This means the spline will have blue coloured mesh, then red coloured mesh from the next way point, then a blue coloured mesh again till the end point.

Please assist me on this.


Attached Files Thumbnail(s)
   
Reply


Messages In This Thread
Syncing UI Spline and Regular 3D Spline - by arrnav96 - 03-12-2019, 08:40 AM

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: