Drawing#

Provides functionality for drawing objects in the flight scene, the map view, the editor and the tracking station.

Example#

The following example draws a line from the center of mass of the active vessel, along the direction it points. The server removes a client’s drawings when the client disconnects, so the example waits 10 seconds before it exits:

using System;
using System.Threading;
using KRPC.Client;
using KRPC.Client.Services.Drawing;
using KRPC.Client.Services.SpaceCenter;

class DrawingExample
{
    public static void Main ()
    {
        using (var connection = new Connection ("Drawing Example")) {
            var vessel = connection.SpaceCenter ().ActiveVessel;
            connection.Drawing ().AddDirectionFromCom (
                Tuple.Create (0.0, 1.0, 0.0), vessel.ReferenceFrame);
            Thread.Sleep (10000);
        }
    }
}