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
  ConnectedControlPointsSelector Problems tyunderwood 1 1,445 10-21-2024, 05:13 PM
Last Post: _Aka_
  I have to refresh generator manualy :( GameDeveloperek4123 4 2,984 10-07-2024, 05:36 PM
Last Post: _Aka_
  Set Volume to the Volume Controller at Runtime pako88 2 2,168 04-08-2024, 03:26 PM
Last Post: _Aka_
  Avoiding runtime GC allocations on control point position change Ell223 8 4,575 02-24-2024, 10:43 AM
Last Post: _Aka_

Forum Jump: