Beispiel #1
0
    protected override void OnDrawScene(SceneView scene)
    {
        Waypoint  keyframe = Target;
        Crazyflie drone    = keyframe.Drone;

        CrazyflieEditor.Draw(drone);
        Vector3 position = GlobalTransform.Transfomed(keyframe.Position);

        if (keyframe.JointType != JointType.Linear)
        {
            DrawTangent(keyframe, false);
            DrawTangent(keyframe, true);
        }

        if (targetPoint == 0)
        {
            CustomHandles.DrawCircle(position, 0.0375f, Color.yellow);
            MoveHandle(keyframe, position, 0.06f, 0.045f, keyframe.SetPosition);
        }
        else
        {
            CustomHandles.DrawCircle(position, 0.0375f, Color.white);
        }

        if (Event.current.type == EventType.KeyDown && Event.current.keyCode == KeyCode.Delete)
        {
            drone.RemoveWaypoint(Target);
        }


        // -- GUI -- //
        DrawGUI(keyframe);
    }
Beispiel #2
0
    protected override void OnDrawScene(SceneView scene)
    {
        ColorKeyframe keyframe = Target;
        Crazyflie     drone    = keyframe.Drone;

        CrazyflieEditor.Draw(drone);

        if (Event.current.type == EventType.KeyDown && Event.current.keyCode == KeyCode.Delete)
        {
            drone.RemoveColorKeyframe(keyframe);
        }

        // -- GUI -- //
        DrawGUI(keyframe);
    }
Beispiel #3
0
    protected override void OnDrawScene(SceneView scene)
    {
        Crazyflie drone = Target.Drone;

        CrazyflieEditor.Draw(drone, true);
    }