Posts: 2
Threads: 1
Joined: May 2020
Dear all,
I am new to this API and I am just playing around with the sample scenes.
In the InfiniteTracks sample, I want to change the code so that it extrudes a custom model, instead of just the rectangle. However I only see the option to change the texture of the tracks, so I want to ask if it is possible to change the rectangles to other models?
Thank you all!
Posts: 2,110
Threads: 92
Joined: Jun 2017
In InfiniteTrack.cs, replace the line shape.SetManagedShape<CSRectangle>(); with whathever you want. You can also create the extrusion shape in the scene and give it as a parameter to InfiniteTrack, instead of making InfiniteTrack create it via code
Have a nice day
Please consider leaving a
review for Curvy, this helps immensely. Thank you.
Available for freelance work—feel free to reach out.
Posts: 2
Threads: 1
Joined: May 2020
(05-02-2020, 01:31 PM)_Aka_ Wrote: In InfiniteTrack.cs, replace the line shape.SetManagedShape<CSRectangle>(); with whathever you want. You can also create the extrusion shape in the scene and give it as a parameter to InfiniteTrack, instead of making InfiniteTrack create it via code
Have a nice day
Awesome! Thanks.
Also, I have a new question. When I moved the GameObject InfiniteTrack to another place(for example 100,100,100), I notice that the tracks don't move, they stay in the original position(0,0,0).
Is there a way to fix this?
Thanks a lot, you are awesome.
Posts: 2,110
Threads: 92
Joined: Jun 2017
05-03-2020, 01:35 PM
(This post was last modified: 05-03-2020, 01:35 PM by _Aka_.)
Hi,
I suggest to you to first get familiar with the Curvy Generator by checking the example scenes and using it via the Unity editor, and only then generate one though API. That way you will know exactly what to do though the API to get to your result.
To answer your question: just set the position of the CurvyGenerator instance to the position you want
Have a nice day
Please consider leaving a
review for Curvy, this helps immensely. Thank you.
Available for freelance work—feel free to reach out.