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.
Available for freelance work, feel free to reach out: toolbuddy.net
Please consider leaving a review for Curvy, this helps immensely. Thank you.
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
  Best way to duplicate a spline with an offset Kapistijn 8 1,319 04-12-2026, 03:18 PM
Last Post: _Aka_
Smile Constant speed along a spline? tfishell 1 649 11-13-2025, 11:32 AM
Last Post: _Aka_
  SplineController Ignores Follow-Up and Chooses Wrong Spline Josenildo 7 4,443 07-29-2025, 09:15 PM
Last Post: _Aka_
  Curvy Line Renderer for UI Spline? gekido 7 6,174 07-13-2025, 07:11 PM
Last Post: _Aka_

Forum Jump: