Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Hello! How do I get objects to scale with Slline?
#1
Please forgive me for my English is not very skilled, I will use Google Translate to write articles..
請原諒我的英文不是很熟練,我將使用Google翻譯來編寫文章..。

Hello! How do I get objects to scale with spline?
哈囉!我要如何讓物件隨著spline進行縮放?

I hope that the yellow sphere of Annex 1 will gradually increase in proportion as the spline approaches the end.
我希望將附件1的黃色圓球,在越spline接近結束時,縮放比例逐漸增加。

Just like the effect of Attachment 2.
就像附件2的效果一樣。

Which parameter of the Generator script is to be modified, or how to write the script.
請問要修改 Generator 腳本的哪個參數,或著要如何撰寫腳本。

Finally, I want to know if I can make a flickering effect, and I don't have to do it like a video.
https://www.youtube.com/watch?v=X6H-H76xZU8
最後我想知道可不可以製作閃爍的效果,不用做到像影片這樣輪流閃爍。

Thanks for reading this article, I hope to answer my question.
感謝閱讀這篇文章,希望可以解答我的問題


Attached Files Image(s)
       
Reply
#2
[attachment=239][attachment=239]I use a very clumsy way to control zoom and flash,
我使用一個很笨的方法來控制縮放及閃爍..。

I am a Unity beginner and can't write very deep scripts...
我是個Unity初學者,沒辦法編寫很深入的腳本..。

There is a misspelled word in the script, please forgive me..
腳本中有拼錯字,請原諒我..

Although it has achieved the effect I want, it is difficult to control.
雖然已經達到我要的效果,但是難以控制。


Attached Files Image(s)
           
Reply
#3
I modified the script, originally I used the multiplier method and changed to use the added method.
我又修改的腳本,原本我是使用乘數的方法,又改為使用增加的方法。

This method better controls the size of the object.
此方式更好控制物件的大小。

And change the flash time to turn flash.
並且將閃時間更改為輪流閃。

I have successfully achieved the effect I want, but is there a better way?
已經成功達到我要的效果,但是有更好的方法嗎?


Attached Files Image(s)
           
Reply
#4
Hi,
You code does what you needed to do. Of course there are always different ways to do a task, and depending on the context and your priorities, one way could be better than the other. So I will give you here some other ways I see to implement what you needed. You don't have to do it the way I will explain, but just be aware of this possible other way, it might be helpful in the future:

- You can set a script in each sphere to handle its scale, instead of having one that handles the scale of all of them. This per sphere script would look at which distance it is on the spline, and scale itself accordingly. This way the sphere near the start will be small, and the ones near the end will be big, automatically. So if you have to change the layout of the spheres, the scaling will be always correct, no need to change the scaling script
More usefull reading:
https://curvyeditor.com/documentation/sp...tart#units
https://api.curvyeditor.com/520/class_fl...984b191486
https://api.curvyeditor.com/520/class_fl...b0fb50293a

- The flickering effect can be done by changing the transparency of the sphere material, through a C# script or even through shaders, instead of disabling the renderer

I hope this helped
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
Also, about Curvy, and if it is not done already, take a look at the scripts used in the example scenes, these are valuables resources for learning how to use Curvy
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
  Placing objects on volume Anthonyk 3 471 12-31-2018, 02:48 PM
Last Post: Anthonyk
  Freeing objects from a spline Renald 1 887 06-20-2018, 11:10 AM
Last Post: _Aka_
  Spawn Objects of differing lengths uniformly along a Spline taylor 1 902 06-19-2018, 05:31 PM
Last Post: _Aka_
  curvy at small scale? hawken 13 5,904 02-14-2018, 03:09 AM
Last Post: hawken

Forum Jump: