Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Change spline path at runtime
#1
Shocked 
Dear Curvy Team,

I would like to change/manipulate the spline of the path, where other objects are following along (during the game at runtime).

What's the best way to do it?

Many thanks!
B
Reply
#2
Hi
yourSpline.ControlPointsList to access the control points, then you can modify any value you deem necessary. See methods that start with Set.... and properties that have setters.
Have a nice day
Please consider leaving a review for Curvy, this helps immensely. Thank you.
Available for freelance work—feel free to reach out.
Reply
#3
Smile 
Thanks for your quick reply!

In my case I would like to modify the path smoothly - like having a falloff to other points when the position of one point is changed.

example:
https://ibb.co/zxfVF1Y
[Image: Falloff1.jpg]

Many thanks!
Reply
#4
The logic behind such spline modification is up to you, depending on your use case. I will give you two suggestions as examples:
1- Make your spline a Bezier spline and then use Bezier handles to modify the shape of it
2- Move the red point up by a distance D, and then move its neighboring points by a distance of D/2, and then their neighboring points by D/4, ....
These are just example to show you that you can do that in different ways, so I can't tell you "this is how you should do it". Whatever way you choose to follow, the API allows it.
Have a nice day
Please consider leaving a review for Curvy, this helps immensely. Thank you.
Available for freelance work—feel free to reach out.
Reply
#5
Thumbs Up 
Thanks for your suggestions!
Reply
#6
You are welcome. If and when you feel like it, please leave a review for the asset, that helps a lot.
Please consider leaving a review for Curvy, this helps immensely. Thank you.
Available for freelance work—feel free to reach out.
Reply
#7
Thumbs Up 
(05-25-2021, 08:37 PM)_Aka_ Wrote: You are welcome. If and when you feel like it, please leave a review for the asset, that helps a lot.

Already done. Keep up the good work!
Reply
#8
Thanks a lot. Will do all my best
Please consider leaving a review for Curvy, this helps immensely. Thank you.
Available for freelance work—feel free to reach out.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Disable a spline's gizmo when not selected or disabled. mikechr2000 1 141 02-03-2025, 09:34 AM
Last Post: _Aka_
  Duplicate Prefab along path rickgplus 1 184 01-23-2025, 10:09 AM
Last Post: _Aka_
Information Questions regarding spline colliders and collisions with rigidbodies Spyboticer 7 515 01-20-2025, 12:25 PM
Last Post: _Aka_
  Extrude mesh along spline. New and confused user GhostStalker 3 215 01-02-2025, 09:58 AM
Last Post: _Aka_

Forum Jump: