Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Best practice for mass-object instancing along 100km spline (railways) plus streaming
Thanks for your patience. I hade finally access to a computer in my vacations. The code I sendyou lacjks only a parnthesis. I wrote it on android, with no way to test it, thu the mistake. Here is the same code but with no parenthesis issue:

Quaternion lookRotation = Quaternion.LookRotation(Spline.transform.TransformPoint(segment.ApproximationT[cachePointIndex]));

GameObject.Instantiate(GameObject, Spline.transform.TransformPoint(segment.Approximation[cachePointIndex]), lookRotation);

I tested it with your project, it works.
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.

Possibly Related Threads...
Thread Author Replies Views Last Post
  Deform mesh on the spline Nico_CL 3 104 10-09-2019, 04:10 PM
Last Post: _Aka_
  Invert the spline points ? UsernameHed 1 97 09-21-2019, 03:22 PM
Last Post: _Aka_
  How to spawn GameObjects on corners of the liinear spline? Pixel Flipper 7 291 09-18-2019, 07:03 PM
Last Post: _Aka_
  Generating multiple object on changing transform jawadkhan.9026 12 1,143 09-06-2019, 09:39 PM
Last Post: _Aka_

Forum Jump: