Posts: 3
Threads: 2
Joined: Sep 2023
I have a spline with dynamically placed and bent/stretched meshes (a bunch of wires). In runtime this rebuilds every frame, I wonder if there is any way to avoid rebuilding the meshes once in runtime and instead just stick to bending and stretching the meshes created?
Either to have them create once at start or just once in the scene. It would save on performance but it would also keep them from popping in new meshes during runtime.
Posts: 1,890
Threads: 77
Joined: Jun 2017
Hi
I believe you are describing a use case that uses both the Volume Spots module to define the placement, and the Deform Mesh module to bend/stretch the meshes.
There is right now no way to freeze the output of the Volume Spots module while allowing the Deform Mesh to update itself. Either both will update when the spline is modified, either none will update.
A way to work around this is to use the Input Transform Spots modules, which allows to define fixed spots:
1- Generate the game objects the usual way in playmode
2- Export these game objects (see the Create Game Object module)
3- Disable these object's mesh renderers/colliders, we don't need them
4- Use the exported objects as inputs for the Input Transform Spots, to define fixed spots
5- Use the fixed spots as inputs for your Deform Mesh.
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.