Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Best practice for mass-object instancing along 100km spline (railways) plus streaming
#10
(09-18-2019, 06:48 PM)_Aka_ Wrote: Where deos the problem happen? Is the imported spline wrong, or is the objects created along the spline wrong? If it is the later, try this (in the loop of the script I send you):

GameObject.Instantiate(GameObject, Spline.transform.TransformPosition(segment.Approximation[cachePointIndex], Quaternion.LookRotation(Spline.transform.TransformPosition(segment.ApproximationT[cachePointIndex])));

It should work. If not, please send me a simple example project so I can see what is wrong

Unfortunately it doesn't work. Here ist a little Unity project for you to understand the problem.

https://we.tl/t-WDsXdhP1WZ
Reply


Messages In This Thread
RE: Best practice for mass-object instancing along 100km spline (railways) plus streaming - by teamteam - 09-21-2019, 11:49 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Curvy Line Renderer for UI Spline? gekido 3 6 04-04-2024, 12:56 PM
Last Post: _Aka_
  Get position of all control points for a spline gekido 1 6 03-28-2024, 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 14 03-04-2024, 11:06 AM
Last Post: _Aka_

Forum Jump: