/// <summary>
 /// Responds to OnClamped event from Value Waypoint
 /// </summary>
 /// <param name="sender">Value Waypoint sending the event</param>
 /// <param name="e">Not Used!</param>
 protected virtual void OnValueVectorClamp(object sender, System.EventArgs e)
 {
     if (valueSmoothWaypoint.Equals(sender as IValueSmoothWaypoint))
     {
         ValueSmoothWaypointUtils.OnValueWaypointClamp(valueSmoothWaypoint);
     }
 }
 /// <summary>
 /// Called to setup variables
 /// </summary>
 protected override void Awake()
 {
     base.Awake();
     ValueSmoothWaypointUtils.InitilizeDirection(valueSmoothWaypoint, OnValueVectorClamp);
     ValueWaypointUtils.SetVecsToNode(valueSmoothWaypoint);
     ValueSmoothWaypointUtils.CalculateCurrentIndex(valueSmoothWaypoint, out m_ControlSection);
 }
        /// <summary>
        /// Get the value by type to set the member variable value
        /// </summary>
        /// <returns>Value type after Value reference to Value Constraints calculation</returns>
        protected override Vector3 GetValue()
        {
            valueSmoothWaypoint.DoAction(Time.deltaTime);
            ValueSmoothWaypointUtils.CalculateCurrentIndex(valueSmoothWaypoint, out m_ControlSection);

            return(BezierCurveUtils.CubicBezier3(
                       m_ControlSection.p0.position,
                       m_ControlSection.q0.position,
                       m_ControlSection.q1.position,
                       m_ControlSection.p1.position,
                       valueSmoothWaypoint.current));
        }