Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Extending the ConnectedControlPointsSelector, based on Player provided input
#1
Information 
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

EKDev.
Reply
#2
Hi

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 helps immensely. Thank you.
Available for freelance work—feel free to reach out.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  ConnectedControlPointsSelector Problems tyunderwood 1 5 10-21-2024, 05:13 PM
Last Post: _Aka_
  Player move with object mcarman 4 8 07-29-2024, 06:49 PM
Last Post: mcarman
  How to modify Input GameObject's transformation properties by script. j95677 2 7 07-05-2024, 06:28 PM
Last Post: j95677
Exclamation Extending Curvy Generator for Advanced Lofting - Feasibility Check amutp 2 6 03-27-2024, 07:25 AM
Last Post: amutp

Forum Jump: