Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Generator does not exactly follow the path
#1
i don't use build in controllers to move along the path, I need special moving and data processing and curvy controller doesn't meet my requirements. I took part of the code from the controllers and everything was ok until I made hills. My object now constantly goes into road mesh or fly over it. I do not want to have extra calculations to move like Volume Controller, but I want generator exactly follow the path! Is there a way to solve my problem?
Reply
#2
Hi
Sorry but I am not sure to understand what the request is. From my understanding, the solution would be to use a Path Controller, which input path should be a path projected on the terrain using the Conform Path module. A full example can be see in example scene 24_CGConformPath.unity.
Did this answer your question? If no, can you describe more or send me a reproduction case?
Thanks and have a nice day
Please consider leaving a review for Curvy, this helps immensely. Thank you.
Available for freelance work—feel free to reach out.
Reply
#3
I have a lot of objects moving along the path, and rather non-standard calculations, I do not want to use built-in controllers or complex calculations like volume controllers. For moving I refer directly to the class CurvySpline like this:
float tf = 0;
int dir = 1;
Vector3 targetPos = mySpline.MoveByLengthFast(ref tf, ref dir, distance, CurvyClamping.Loop);
Vector3 ver = mySpline.GetOrientationUpFast(tf);
targetPos += ver * .5f;
Quaternion rot = mySpline.GetOrientationFast(tf);
myHero.transform.rotation = rot;
myHero.transform.position = targetPos+myHero.transform.right*shift;

when the path changes its height, road generator does not exactly follow this path, so my objects sometimes fly over it, and sometime goes inside the mesh. this problem does not exist on a straight line, only on hills, but even on small ones, so I think that the generator smoothes somewhere and does not exactly repeat the path
Reply
#4
What version of Curvy Splines do you use?
Please consider leaving a review for Curvy, this helps immensely. Thank you.
Available for freelance work—feel free to reach out.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  I have to refresh generator manualy :( GameDeveloperek4123 4 13 10-07-2024, 05:36 PM
Last Post: _Aka_
  Can't set CG Path Controller j95677 4 22 10-04-2024, 06:55 PM
Last Post: j95677
  Bug: Save Generator Outputs still saves outputs if object is disabled curvymesher 1 3 08-30-2024, 09:19 AM
Last Post: _Aka_
  How can I set the generator to stop updating? emerrryjones 1 10 07-26-2024, 10:07 AM
Last Post: _Aka_

Forum Jump: