Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Using another model for InfiniteTracks sample
#1
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!
Reply
#2
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 will help a lot keeping Curvy relevant in the eyes of the Asset Store algorithm.
Reply
#3
(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.
Reply
#4
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 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
  Paint Spline Sample kilik 2 2,903 02-01-2017, 09:56 AM
Last Post: kilik

Forum Jump: