Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Issue with InfiniteTrack example
#1
Hi I've been using curvy for a little while but I'm no expert.

I was modifying some things on the InfiniteTrack example but I noticed the Curvation for X and Y doesn't seem to be working properly it seems to be swapped,  X is using the Y axis value and Y is using X. I was wondering if it's a issue with this method or something else

Code:
        // add more CP's, rotating path by random angles
        void addTrackCP()
        {
            float rndX = Random.value * CurvationX * DTUtility.RandomSign();
            float rndY = Random.value * CurvationY * DTUtility.RandomSign();
            Vector3 p = TrackSpline.ControlPoints[TrackSpline.ControlPointCount - 1].localPosition;

            mDir = Quaternion.Euler(rndX, rndY, 0) * mDir;
            TrackSpline.InsertAfter(null).localPosition = p + mDir * CPStepSize;


        }

Thanks
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Lightmap/Shadow issue TurboHans 4 807 11-24-2020, 08:33 AM
Last Post: TurboHans
  UV issue with variable mix shape modifier MarioBag 4 2,684 12-07-2019, 01:43 PM
Last Post: _Aka_
  Follow Up Spline Issue JHulse95 8 6,805 07-25-2019, 02:36 PM
Last Post: _Aka_
  Import Curvy from json Issue mlndb10wN 5 4,354 05-29-2019, 06:46 PM
Last Post: _Aka_

Forum Jump: