Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Custom connection controller help
#2
Hi,

There is a class called ConnectedControlPointsSelector. You inherit from this class, and override its unique abstract method. Here is an example:

Code:
   using System.Linq;
   using UnityEngine;

   class Example : ConnectedControlPointsSelector
   {
       public override CurvySplineSegment SelectConnectedControlPoint(SplineController caller, CurvyConnection connection, CurvySplineSegment currentControlPoint)
       {

               return connection.ControlPointsList.Last();         

       }
   }

This example selector always chooses the last control point in the list of connected control points.

Then, you create an object in your scene having the Example script attached to it.
Finally, in your controller's inspector, you set "At connection, use" to "Custom", and then select the object created earlier in the field "Custom Selector"

Please let me know if you still have any question.

Have a nice day
Please consider leaving a review for Curvy Splines, this helps immensely. Thank you.
Reply


Messages In This Thread
Custom connection controller help - by dazz777 - 11-19-2018, 02:02 PM
RE: Custom connection controller help - by _Aka_ - 11-19-2018, 02:12 PM
RE: Custom connection controller help - by _Aka_ - 11-21-2018, 10:11 AM
RE: Custom connection controller help - by _Aka_ - 11-21-2018, 11:26 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
Lightbulb Junction & Connection Navigation System Design SAMYTHEBIGJUICY 6 4,037 03-25-2026, 10:10 PM
Last Post: _Aka_
  Anomalous connection handling SAMYTHEBIGJUICY 1 1,508 12-04-2024, 05:08 PM
Last Post: _Aka_
  Can't set CG Path Controller j95677 4 3,597 10-04-2024, 06:55 PM
Last Post: j95677
  How to use CG Volume Controller j95677 5 4,009 07-17-2024, 07:15 PM
Last Post: j95677

Forum Jump: