Posts: 43
Threads: 15
Joined: Apr 2023
Is it possible to add my own Control Nodes and or ControlNode logic in a optimal way?
I'm trying to allow raycasting from control nodes to detect if colliding with things, currently I generate my own nodes but this requires keeping track of the real control points, and then my own nodes. I'd like to find a way to combine the two.
Posts: 2,092
Threads: 88
Joined: Jun 2017
Curvy splines has different ways to project a spline. You can see them in action in this video
https://www.youtube.com/watch?v=PtP4A2sQphE
I hope at least one of them (thinking about projecting the path using the Conform Path module, which keeps your spline intact) will be the solution you are looking for.
Please consider leaving a
review for Curvy. This will help a lot keeping Curvy relevant in the eyes of the Asset Store algorithm.
Posts: 43
Threads: 15
Joined: Apr 2023
(05-26-2023, 11:12 AM)_Aka_ Wrote: I hope at least one of them (thinking about projecting the path using the Conform Path module, which keeps your spline intact) will be the solution you are looking for.
Thanks however I don't think this covers my issue. I've broken my splines into just segments. Each segment is a new spline which I connect to others via connections. My editor is at runtime and needs to raycast the points to check for overlaps to check if building is possible and apply connections.
Currently I'm generating my own nodes that try and match the control point nodes. However I was thinking it'd be much simpler if I added my own code to the control nodes.
Either a way to override the existing control node with my own scripts, or if its possible to add a component to the pooled control node would be great.
Posts: 2,092
Threads: 88
Joined: Jun 2017
05-27-2023, 09:05 PM
(This post was last modified: 05-27-2023, 09:05 PM by _Aka_.)
You can use one of the events of the CurvySpline class (such as OnAfterControlPointAdd) to run your code every time your spline is modified. Your code wouldmake sure your spline's control points do have your custom script on them.
Please consider leaving a
review for Curvy. This will help a lot keeping Curvy relevant in the eyes of the Asset Store algorithm.