Exemplo n.º 1
0
        void OnEnable()
        {
            _previousPosition = transform.position;

            CatmullRomRoot root = transform.GetComponentInParent <CatmullRomRoot>();

            if (root != null)
            {
                _splineRoot = root;
            }
            else
            {
                Debug.LogError("Spline nodes must be parented to a root.");
            }
        }
Exemplo n.º 2
0
 static void RenderCustomGizmo(CatmullRomRoot splineRoot, GizmoType gizmoType)
 {
     DrawSpline(splineRoot.PointsAlongSpline);
     //DrawNodes(splineRoot.GetComponentsInChildren<CatmullRomNode>());
 }