Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Runtime] ClonePath + CurySpline refresh problems
#8
(01-15-2014, 07:51 PM)Jake Wrote: Just to clarify: With "follow the spline" you mean that you're moving the CPs (e.g. by setting the transform's position) by code, right? 

Thanks for the quick reply!

Yup, my code pretty much looks like this:

Code:
CurvySpline spline = CurvySpline.Create();

spline.Interpolation = CurvyInterpolation.Bezier;

CurvySplineSegment startControlPoint = spline.Add();
CurvySplineSegment endControlPoint = spline.Add();

startControlPoint.transform.position = Vector3.zero;
endControlPoint.transform.position = new Vector3(10, 0, 10);

startControlPoint.HandleOut = new Vector3(0, 0, 5);
endControlPoint.HandleIn = new Vector3(-5, 0, 0);

Ignore everything prior to this post because having just used that code in a new scene I think "not refreshing" is inaccurate.

The code above successfully creates a 90 degree curve, but as soon as I select the endControlPoint (CP001) in the editor (paused) view, the bug shows itself - the endControlPoint HandleIn position suddenly moves from (-5, 0, 0) to (-1, 0, 0).

So the bug appears to only happen after pausing the game and selecting the endControlPoint in editor view.
 
Reply


Messages In This Thread

Possibly Related Threads…
Thread Author Replies Views Last Post
  Set Volume to the Volume Controller at Runtime pako88 2 10 04-08-2024, 03:26 PM
Last Post: _Aka_
  Avoiding runtime GC allocations on control point position change Ell223 8 18 02-24-2024, 10:43 AM
Last Post: _Aka_
Wink Modifying Splines at Runtime artsung 1 7 01-30-2024, 09:40 AM
Last Post: _Aka_
  Is it possible to create a road texture at runtime? artsung 1 4 01-30-2024, 09:30 AM
Last Post: _Aka_

Forum Jump: