Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to make mesh appear only on curves?
#1
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.

[Image: AptAPL1.png]

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  Blush
Reply
#2
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 will help a lot keeping Curvy relevant in the eyes of the Asset Store algorithm.
Reply
#3
Helpful methods:
CurvySpline.GetTangent
BuildRasterizedPath.From
BuildRasterizedPath.To
Please consider leaving a review for Curvy. This will help a lot keeping Curvy relevant in the eyes of the Asset Store algorithm.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
Heart Create beautiful curves ShiroeYamamoto 3 9 03-26-2024, 06:25 PM
Last Post: _Aka_
  Adjust radius of generated mesh via script? Shackman 1 3 03-26-2024, 01:12 PM
Last Post: _Aka_
  Not seeing mesh extended after following YT PaulM 1 3 02-02-2024, 12:01 PM
Last Post: _Aka_
  Trigger Zones along Spline Mesh dlees9191 1 5 01-05-2024, 10:18 AM
Last Post: _Aka_

Forum Jump: