Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Curved flowing dots/3d spheres
#1
Hi there

What is the correct aproach to make some curved setup like this:
image with dots - http://dafirm.dk/curve.jpg

But - in real 3d curve - not just UI canvas? + animated. 

Should i use multiple spheres/sprites - and how will I create multiple of these to be animated along the spline? Do i use the generator?

Thanks :-)
Karsten
Reply
#2
Hi,
Your issue can be subdivided in two:

1- Creating the path:
I advise you to use a Bézier spline. You can create the spline either manually, by placing the control points and Bézier handles yourself, or via the API. If you look at the method CSRoundedRectangle.ApplyShape(), you can see how rounded rectangles are build using the API. I mentioned rounded rectangles because their corners seem similar to what you want to draw

2- Adding the dots:
You can indeed use a Curvy Generator to fill the path with sphere meshes/game objects. To animate them, you can either use a Spline Controller on each sphere to make it move along a spline (by setting their Position and Speed), or write a single script that moves all the spheres at once. This will have better performance, CPU wise, than having a script for each sphere, especially if you have a lot of them.
Please consider leaving a review for Curvy. This will help a lot keeping Curvy relevant in the eyes of the Asset Store algorithm.
Reply
#3
And here is a zip with such simple animating script, and a test scene


Attached Files
.zip   MovingSpheres.zip (Size: 323.15 KB / Downloads: 1)
Please consider leaving a review for Curvy. This will help a lot keeping Curvy relevant in the eyes of the Asset Store algorithm.
Reply
#4
(12-14-2018, 04:24 PM)_Aka_ Wrote: And here is a zip with such simple animating script, and a test scene

Thanks a lot - i send you pm - :-)
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Extrude shape along curved path in engine zcwaa22 0 2,203 02-24-2017, 12:00 PM
Last Post: zcwaa22
  Berms (banked turns += wider & curved road) Pre-purchase query Arakade 3 6,718 05-26-2015, 06:27 AM
Last Post: Jake

Forum Jump: