Beispiel #1
0
 private static void DrawNonSelected(Crazyflie drone, GizmoType gizmo)
 {
     if (PreferencesMenu.PathEnabled)
     {
         //DrawDroneBounds(drone, Palette.UltraTranslucent);
         List <Waypoint> waypoints = drone.Waypoints;
         CustomHandles.DrawBezierPath(waypoints, Palette.UltraTranslucent, 2.0f);
     }
 }
Beispiel #2
0
    /// -------- DRONE HANDLES -------- ///

    public static void DrawDroneHandles(Crazyflie drone, bool active)
    {
        float           time      = (float)TimelineUtilities.Director.time;
        List <Waypoint> waypoints = drone.Waypoints;

        CustomHandles.DrawBezierPath(waypoints, Color.white, 2.0f);
        DrawWaypoints(waypoints);
        ColorKeyframeEditor.DrawColorKeyframes(drone, waypoints);
        if (active)
        {
            DrawDroneBounds(drone, Palette.Translucent);
            // DrawDroneBounds(drone, Color.white);

            EditorGUI.BeginChangeCheck();
            Vector3 updatedPosition = CustomHandles.MoveHandle(drone.transform.position, 0.025f, 0.085f);
            if (EditorGUI.EndChangeCheck())
            {
                drone.SetWaypoint(updatedPosition, time);
            }
        }

        //CustomHandles.DrawTangent(waypoints, 0.25f, time);
    }