09-18-2016, 03:29 AM
How do I force the creation of a mesh at runtime? If I use a generator, the mesh gets created if I run the creation through a co-routine, but how do I force the mesh to be created without a co-routine?
|
Force Mesh creation at runtime?
|
|
09-18-2016, 03:29 AM
How do I force the creation of a mesh at runtime? If I use a generator, the mesh gets created if I run the creation through a co-routine, but how do I force the mesh to be created without a co-routine?
09-19-2016, 03:15 PM
Like answered by mail: Call CurvyGenerator.Refresh(), then use the CreateMesh module's SaveToScene() method to "extract" the meshes.
This code does not work, unless, I put it into a co-routine with a 0.1f second wait.
Code: // Create the spline
What does "var SHAPE=Rails[0].CopyTo(GENERATOR)" is supposed to do?
Edit: Nevermind, should know my own API better ![]() You shouldn't need to make your shape spline a managed spline (that's what you do with copying it into the CG space). I just noticed your other post, will continue there...
Rails[0] is a shape inside of another generator created within the editor. The thing is, the code runs fun if I put it into a co-routine and let the system run though a bunch of frames, but doesn't work if I run it straight.
![]() In retrospect, I may have done this because I couldn't figure out a way to create the shape at runtime. I could create a shape consisting of pre-fab elements like circles and boxes, but how do I create a spline and tell Curvy to extrude it along the path ... all at runtime? There was no sample in the example code that I could find to do that. |
|
« Next Oldest | Next Newest »
|
| Possibly Related Threads… | |||||
| Thread | Author | Replies | Views | Last Post | |
| Replace deform mesh on volume spots | Kokoriko49 | 1 | 2,142 |
06-09-2025, 06:49 PM Last Post: _Aka_ |
|
| Mesh Generation between two splines | vatan | 4 | 3,296 |
02-14-2025, 07:11 AM Last Post: vatan |
|
| Create Mesh Node, Make Static Options | rickgplus | 1 | 1,680 |
01-23-2025, 10:12 AM Last Post: _Aka_ |
|
| Extrude mesh along spline. New and confused user | GhostStalker | 3 | 2,733 |
01-02-2025, 09:58 AM Last Post: _Aka_ |
|