Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Relative Scaling
#1
Hi i try get relative scaling

so i have try 

when i change parent of input spline shape and duplicate my generator i lost reference

i try right this script 

[Image: 0015d8730a.jpg]

[Image: 236f156042.jpg]


i don't find radius input spline shape in api 

thank's

for exemple try get control this result by script

https://www.google.com/imgres?imgurl=https%3A%2F%2Fcdn0.iconfinder.com%2Fdata%2Ficons%2Fdiagram-set%2F505%2Fdiagram_39-512.png&imgrefurl=https%3A%2F%2Fwww.iconfinder.com%2Ficons%2F311226%2Faim_chart_cicle_colorful_diagram_finance_graph_icon&docid=M1FGZpY7yFAqXM&tbnid=g4Zek3DBlsg6HM%3A&vet=10ahUKEwiE0tGbraTgAhVPOhoKHeXUDPcQMwhBKAIwAg..i&w=512&h=512&bih=938&biw=1920&q=cicle&ved=0ahUKEwiE0tGbraTgAhVPOhoKHeXUDPcQMwhBKAIwAg&iact=mrc&uact=8
Reply
#2
Hi,
The simplest solution is to use the provide Circle shape (class name CsCircle) and modify its Radius property
Have a nice day
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
i'am sorry for asking for exemple
because my mathematical is old school
and i lost my day on it so help is welcome

based on generator transform scale
when i scale i call fonction
cSCircle.Radius = transform.localScale.x*facteur / 0.5f;

and somethinks happen but i don't found goal ;(

i found easy way use two CsCircle working
i will look if this do the job i need make
thank's
Reply
#4
Hi,
I attached a zip with a scene and a script. The script goes through the assigned Curvy Generators, and modifies the radius of their input splines.
This solution does not modify the scaling vector, but instead updates the Radius property of the circles. If, for your own needs, have to set the scaling, then make sure to use the latest Curvy version (the 5.2.0), and set the "Use Global Space" to true in the CG modules "Input Spline Path" and/or "Input Spline Shape"
Did I answer to all your questions?
Have a nice day


Attached Files
.zip   Circles Scaler.zip (Size: 80.17 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
#5
And here is an example using the scaling

Please keep in mind that these are test codes, that assume that everything is set up properly in the scenes.


Attached Files
.zip   Circles Scaler_2.zip (Size: 80.16 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


Possibly Related Threads…
Thread Author Replies Views Last Post
  Finding relative position across connected splines DekoGames 1 8 02-05-2024, 10:11 PM
Last Post: _Aka_
  Shape extrusion scaling tairoark 5 19 06-07-2022, 05:35 AM
Last Post: _Aka_
  Get position on spline relative to world position Mos Def 9 2,786 05-20-2021, 08:32 AM
Last Post: _Aka_
  Move with constant velocity in Relative mode athos_k 3 1,920 07-21-2020, 11:39 AM
Last Post: _Aka_

Forum Jump: