Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Add VolumeController at runtime
#1
Hi,

I have 2 questions:

How can I add volume at runtime for VolumeController? I know that VolumeController has a 'volume' property that can be filled, but I can't find where that reference object is under the generator. I looked for BuildShapeExtrusion and BuildVolumeMesh APIs with no luck.

And another question, when I fill that volume to VolumeController, the object will instantly snap to the spline position, even if 'automatically play' is disabled? If yes, how can I make it not auto-snap to the spline?

Thanks in advance!  Big Grin
Reply
#2
Hi
1- The answer is here: https://forum.curvyeditor.com/thread-1475.html
2- For the object to not snap, you will have to disable the controller.
I hope this helped.
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
(12-15-2023, 03:53 PM)_Aka_ Wrote: Hi
1- The answer is here: https://forum.curvyeditor.com/thread-1475.html
2- For the object to not snap, you will have to disable the controller.
I hope this helped.
Have a nice day.

Thanks for the answers!

About the question 2:

I still would like to smoothly move the object to the spline instead of snapping. Is there a way we can do it like the 'damping' option out-of-the-box or should I need to create a child class of VolumeController myself and change that setting?

Thanks again!  Smile
Reply
#4
You are welcome.

This damping is not available out of the box. You would probably need to create a child class, and override the ComputeTargetPositionAndRotation method to define the lerping logic between controlled and not controlled transform.

Have a nice weekend.
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
  Set Volume to the Volume Controller at Runtime pako88 2 10 04-08-2024, 03:26 PM
Last Post: _Aka_
  Avoiding runtime GC allocations on control point position change Ell223 8 18 02-24-2024, 10:43 AM
Last Post: _Aka_
Wink Modifying Splines at Runtime artsung 1 7 01-30-2024, 09:40 AM
Last Post: _Aka_
  Is it possible to create a road texture at runtime? artsung 1 4 01-30-2024, 09:30 AM
Last Post: _Aka_

Forum Jump: