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 will help a lot keeping Curvy relevant in the eyes of the Asset Store algorithm.
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 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
Exclamation Extending Curvy Generator for Advanced Lofting - Feasibility Check amutp 2 4 Yesterday, 07:25 AM
Last Post: amutp
  8.8.0 is live, and it improves Curvy Generator greatly _Aka_ 0 6 Yesterday, 03:23 AM
Last Post: _Aka_
  Generating GO only on CPs in Generator GameDeveloperek4123 1 6 03-04-2024, 11:06 AM
Last Post: _Aka_
Question Generator Canvas workflow issues Sacryn 1 7 02-02-2024, 11:22 PM
Last Post: _Aka_

Forum Jump: