Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Guide to custom placing stuff on spline
#10
(11-18-2023, 06:16 AM)Lupos Wrote: List<CGVMesh> inputMeshes,
            SubArray<CGSpot> inputSpots,
            SubArray<CGSpot> outputSpots,
            [NotNull] CGVMesh[] outputMeshes,
            [NotNull] CGPath path,
            bool stretchToEnd,
            ThreadPoolWorker<CGSpot> threadPoolWorker

its rather difficult to understand the steps needed to get all this data in my own custom setup. I was hoping you could provide me some steps to get this data.

From my understanding I need to rasterize the spline first, then generate volume spots for it from the game objects I plan to use as well convert the meshes from the gameobjects into CGVMeshes.


Where would you suggest I begin?

If you want to follow the path of scenario B, which I don't recommand, the parameters you listed are commented and have their types commented, but as a small summary:
  • CGVMesh  is the equivalent of Mesh
  • CGSpot  is the equivalent of Transform + an index of the object to use the transform on.
  • CGPath  has no equivalent in vanilla Unity, it's the list of points making a spline, result of its rasterization.
  • SubArray<> is part of an array. This class exists to be able to reuse arrays easily instead of creating/destroying them every time.
  • ThreadPoolWorker<> handles multi-threading.

To see how spots are created, check the InputSpots module.
To see how CGPath is created, check the InputSplinePath module.
To see how a CGVMesh is converted to a normal mesh, check the CreateMesh module, and especially the WriteVMeshToMesh method.

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


Messages In This Thread
RE: Guide to custom placing stuff on spline - by _Aka_ - 11-22-2023, 11:22 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  How to get length starting from one spline to connected nth spline Dragon-3623 1 1 05-14-2024, 04:52 PM
Last Post: _Aka_
  Curvy Line Renderer for UI Spline? gekido 3 6 04-04-2024, 12:56 PM
Last Post: _Aka_
  Get position of all control points for a spline gekido 1 6 03-28-2024, 10:08 PM
Last Post: _Aka_
Bug Changing spline connection in inspector causes splines to revert to defaults lacota 3 6 03-18-2024, 07:55 PM
Last Post: _Aka_

Forum Jump: