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
  Rotation issue with generator nicolaj.h.andersen@gmail.com 1 14 04-14-2023, 11:58 AM
Last Post: _Aka_
  BuildVolumeMesh issue tairoark 40 95 11-25-2022, 07:57 AM
Last Post: _Aka_
Exclamation DuplicateEditorMesh performance issue Guillaume 5 12 01-18-2022, 01:44 PM
Last Post: _Aka_
  Lightmap/Shadow issue Sacryn 4 1,524 11-24-2020, 08:33 AM
Last Post: Sacryn

Forum Jump: