Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Add On Control Point Reached (CurvySplineMoveEventArgs) during runtime?
#1
Hi Jake,

I'm using the default Spline Controller script on a game object with a Spline assigned.

I'm looking to add an On Control Point Reached (CurvySplineMoveEventArgs) at runtime via code, so that the Spline Controller object triggers this event when it hits every control point.  

The event is a function within the CurvyEventHandler, which is also being added to the same Spline Controller game object at runtime.

I'm having a heck of a time figuring this out.  Any advice?

Thanks much,
Michael
Reply
#2
Out of my head: SplineController.OnControlPointsReached.AddListener() should bind a callback to that event.
Reply
#3
This led me to the right solution. Thanks so much for the help!
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Accessing generator's input spline in script, changing it at runtime smackledorf 3 298 06-17-2021, 01:59 PM
Last Post: _Aka_
  Updating MaterialID in MetaCGOptions at Runtime boriskourt 5 323 06-16-2021, 03:54 PM
Last Post: _Aka_
  Questions about Generator: mesh/objects within spline, snap to control point dartboard 5 467 06-09-2021, 12:42 PM
Last Post: _Aka_
Shocked Change spline path at runtime burn0815 7 805 05-27-2021, 08:27 PM
Last Post: _Aka_

Forum Jump: