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 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:

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
  Rotation of Curvy Spline Segment jh092 1 11 05-31-2020, 09:36 AM
Last Post: _Aka_
  How to create exactly N gameobjects at spline? ThomasTheTank 1 46 05-24-2020, 01:56 PM
Last Post: _Aka_
  Connection survives spline duplication rmrmrm 7 225 05-22-2020, 01:28 PM
Last Post: _Aka_
  Simple Spline Extrusion GelsonBieber 1 110 05-08-2020, 01:47 PM
Last Post: _Aka_

Forum Jump: