Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Extending the ConnectedControlPointsSelector, based on Player provided input
I find myself with a use case that requires me to build a custom Connection Handler. I found that extending the ConnectedControlPointsSelector class was the solution that is recommended, but I have no idea where to start outside of extending that class.  Huh

I poked around on the forum for more information, but found very little that seemed to suggest solutions, as I know that posting code in the forums is not okay. Heart

I'd really appreciate some more information on the best practice for extending the class , as I just want to be able to have the player reach a connection, then get input from the player, and choose the connected spline that is closest to the player provided input.

Thank You, Heart


ConnectedControlPointsSelector is an abstract class with a single abstract method. Hopefully, the class and method's documentation will be enough to understand what that method does and what the implementation should do. If not, please write here so that I explain further.
Once your child class is implemented, go to your scene and add your child class as a component to any gameobject. Then go to your controller's inspector, in the Connectins Handling section set the value to Custom:
Then set the component you added earlier in the Custom Selector field.

You said: "I know that posting code in the forums is not okay"
Any reason for that? Personally I see no issue in you posting code here, as long as you are aware that this is a public forum, which means that you should not post any code that you want to keep private.

Did my answer help?
Have a nice day
Please consider leaving a review for Curvy. This will help a lot keeping Curvy relevant in the eyes of the Asset Store algorithm.

Possibly Related Threads…
Thread Author Replies Views Last Post
Exclamation Extending Curvy Generator for Advanced Lofting - Feasibility Check amutp 2 5 03-27-2024, 07:25 AM
Last Post: amutp
  Curvy discards Input Spline Range VoltDriver 3 5 11-28-2023, 07:14 PM
Last Post: _Aka_
  Skip Input Mesh if spline has too much bend Zilk1 3 9 09-27-2023, 09:45 PM
Last Post: _Aka_
  Programming a first-person player/camera to follow a Curvy Spline kenmarold 1 6 05-21-2023, 05:03 PM
Last Post: _Aka_

Forum Jump: