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
  Custom Control Nodes Lupos 3 3 05-27-2023, 09:05 PM
Last Post: _Aka_
  How do I get the closest Spline Control Point Lupos 2 10 05-12-2023, 01:59 AM
Last Post: Lupos
  How to get direction of last control point? _RicO 4 13 04-13-2023, 11:27 AM
Last Post: _Aka_
Photo How to check if a point is inside of a polygon? XtroTheArctic 1 2 03-20-2023, 08:53 AM
Last Post: _Aka_

Forum Jump: