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

Code:
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.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Curvy Line Renderer for UI Spline? gekido 1 1 Yesterday, 10:12 PM
Last Post: _Aka_
  Get position of all control points for a spline gekido 1 2 Yesterday, 10:08 PM
Last Post: _Aka_
Bug Changing spline connection in inspector causes splines to revert to defaults lacota 3 6 03-18-2024, 07:55 PM
Last Post: _Aka_
  GO can't fit end of the spline GameDeveloperek4123 3 13 03-04-2024, 11:06 AM
Last Post: _Aka_

Forum Jump: