Posts: 1
Threads: 1
Joined: Jan 2023
Hi there,
I'm working with Curvy Splines to make a track generator. I want to make the race curbs (the thing that has a white-red pattern) only appear on the curve zones, and disappear on the straight lines.
I'm trying to make a script that makes that, but I'm not getting it working. The API reference is just that, but there aren't many script examples out there.
Any suggestion will be appreciated, thanks in advance
Posts: 2,110
Threads: 92
Joined: Jun 2017
01-09-2023, 09:05 AM
(This post was last modified: 01-09-2023, 09:09 AM by _Aka_.)
Hi
It seems that you didn't receive my answer to your email. Maybe it went into your spam folder? Here is the answer I send you in that email:
There is no out of the box tool for this. You can do this though using the API:
basically, you need first to divide your mesh to 3 meshes: the road, the left curbs, the right curb. You will use each mesh in a separate curvy generator. The road one will be on the full spline, but the curbs ones will apply only on the turns. Using the API, you traverse the spline and detect the spline's tangent variation, in other words, you detect the track turns. Then you create or modify already created generators to make the generation of the curbs mesh applied only on the relevant part of the splines. The Range parameter in the Input Spline Path Rasterize Path module is key.
I hope this helped.
Please consider leaving a
review for Curvy, this helps immensely. Thank you.
Available for freelance work—feel free to reach out.
Posts: 2,110
Threads: 92
Joined: Jun 2017
Helpful methods:
CurvySpline.GetTangent
BuildRasterizedPath.From
BuildRasterizedPath.To
Please consider leaving a
review for Curvy, this helps immensely. Thank you.
Available for freelance work—feel free to reach out.