Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Spline object on a spline path
#21
1) Common ATHellboy, it's easy to find. Did you look for it before asking me? I feel that you rely too much on me. The Position of a spline controller is SplineController.Position.
The From and To fields of Shape Extrusion module is BuildShapeExtrusion.From and BuildShapeExtrusion.To.
2) The solution is to unpack the generator (unlink it from the prefab)
Please consider leaving a review for Curvy. This will help a lot keeping Curvy relevant in the eyes of the Asset Store algorithm.
Reply
#22
(03-01-2020, 03:12 PM)_Aka_ Wrote: 1) Common ATHellboy, it's easy to find. Did you look for it before asking me? I feel that you rely too much on me. The Position of a spline controller is SplineController.Position.
The From and To fields of Shape Extrusion module is BuildShapeExtrusion.From and BuildShapeExtrusion.To.
2) The solution is to unpack the generator (unlink it from the prefab)

1) Dude, I think you don't understand my need! I know how to access them but as you know the From and To values are not same as SplineController.Postion although they should be, because they are based on Spline. BTW you said they are not same (Although I don't know what the reason is) and I should sync them (if it means how to make them same) and because it is rely on your API I should ask for help from you.
Now you know what the problem is ?

2) I did understand this solution but it is not really a solution! I made that prefab for a reason l, to make change on all of them if we will need to so by unlinking I will  lose this functionality which is most important functionality of prefab.
Reply
#23
1) I don't see why they should be the same: there are different values for different independent features. In your game you want them to be the same, and the API allows for it, but I don't see why it should be the same for all the other users.
So, first, read this if it is not already the case, so you understand what is difference between TF (which represents a mathematical notion behind splines) and distance (which is the notion that most people think with): https://curvyeditor.com/documentation/splines/start?s[]=tf#units
then, here is the code you want:
yourShapeExtrusion.From = yourController.AbsolutePosition / yourController.Spline.Length;
I did not compile this code, so it might have a minor typo

2)That's a restriction coming from Unity's side. If I find a workaround around it I will include it the next update
Please consider leaving a review for Curvy. This will help a lot keeping Curvy relevant in the eyes of the Asset Store algorithm.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Curvy Line Renderer for UI Spline? gekido 1 1 10 hours ago
Last Post: _Aka_
  Get position of all control points for a spline gekido 1 2 10 hours ago
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 13 03-04-2024, 11:06 AM
Last Post: _Aka_

Forum Jump: