TargetController#

type krpc_MechJeb_TargetController_t#

The target controller, which holds MechJeb’s target.

Note

Positions and directions are in world space, the coordinate system of the game’s physics.

KRPC_CLASS_MECHJEB_TARGETCONTROLLER#

The service and class ids of the class, for krpc_KRPC_Type_ClassTypeById().

krpc_error_t krpc_MechJeb_TargetController_CanAlign(krpc_connection_t connection, bool *returnValue, krpc_MechJeb_TargetController_t instance)#

Whether the vessel can align with the target, which it can with a docking port. Throws an exception if there is no target.

Game Scenes:

Flight

krpc_error_t krpc_MechJeb_TargetController_Distance(krpc_connection_t connection, float *returnValue, krpc_MechJeb_TargetController_t instance)#

The distance to the target, in meters. Throws an exception if there is no target.

Game Scenes:

Flight

krpc_error_t krpc_MechJeb_TargetController_DockingAxis(krpc_connection_t connection, krpc_tuple_double_double_double_t *returnValue, krpc_MechJeb_TargetController_t instance)#

The world space docking axis of the target. Throws an exception if there is no target.

Game Scenes:

Flight

krpc_error_t krpc_MechJeb_TargetController_NormalTargetExists(krpc_connection_t connection, bool *returnValue, krpc_MechJeb_TargetController_t instance)#

Whether there is a target that is a vessel, a body or a direction target.

Game Scenes:

Flight

krpc_error_t krpc_MechJeb_TargetController_Position(krpc_connection_t connection, krpc_tuple_double_double_double_t *returnValue, krpc_MechJeb_TargetController_t instance)#

The world space position of the target. Throws an exception if there is no target.

Game Scenes:

Flight

krpc_error_t krpc_MechJeb_TargetController_PositionTargetExists(krpc_connection_t connection, bool *returnValue, krpc_MechJeb_TargetController_t instance)#

Whether there is a target that is a position or a vessel.

Game Scenes:

Flight

krpc_error_t krpc_MechJeb_TargetController_RelativePosition(krpc_connection_t connection, krpc_tuple_double_double_double_t *returnValue, krpc_MechJeb_TargetController_t instance)#

The world space position of the vessel relative to the target. Throws an exception if there is no target.

Game Scenes:

Flight

krpc_error_t krpc_MechJeb_TargetController_RelativeVelocity(krpc_connection_t connection, krpc_tuple_double_double_double_t *returnValue, krpc_MechJeb_TargetController_t instance)#

The world space velocity of the vessel relative to the target, in \(\mathrm{m/s}\). Throws an exception if there is no target.

Game Scenes:

Flight

krpc_error_t krpc_MechJeb_TargetController_SetDirectionTarget(krpc_connection_t connection, krpc_MechJeb_TargetController_t instance, const char *name)#

Set the target to a direction.

Parameters:
  • name – The name of the target.

Game Scenes:

Flight

krpc_error_t krpc_MechJeb_TargetController_TargetOrbit(krpc_connection_t connection, krpc_SpaceCenter_Orbit_t *returnValue, krpc_MechJeb_TargetController_t instance)#

The orbit of the target. Throws an exception if there is no target, or the target has no orbit.

Game Scenes:

Flight

krpc_error_t krpc_MechJeb_TargetController_UpdateDirectionTarget(krpc_connection_t connection, krpc_MechJeb_TargetController_t instance, const krpc_tuple_double_double_double_t *direction)#

Set the direction of the direction target.

Parameters:
  • direction – The world space direction.

Game Scenes:

Flight