Camera#
- class SpaceCenter.Camera#
Controls the game’s camera. Obtained by calling
SpaceCenter.camera.-
mode:
SpaceCenter.CameraMode# The current mode of the camera.
- Attribute:
Can be read or written
Note
Setting the mode to
SpaceCenter.CameraMode.ivathrows an exception if the active vessel has no crew, or none of its crew can be viewed in an interior.
- next_camera()#
Switch to the next available camera. In flight, this moves to the next flight camera mode. In IVA, it moves the view to the next crew member in the active vessel.
- previous_camera()#
Switch to the previous available camera. In flight, this moves to the previous flight camera mode. In IVA, it moves the view to the previous crew member in the active vessel.
-
pitch:
number# The pitch of the camera, in degrees. A value between
SpaceCenter.Camera.min_pitchandSpaceCenter.Camera.max_pitch- Attribute:
Can be read or written
-
heading:
number# The heading of the camera, in degrees.
- Attribute:
Can be read or written
-
distance:
number# The distance from the camera to the subject, in meters. A value between
SpaceCenter.Camera.min_distanceandSpaceCenter.Camera.max_distance.- Attribute:
Can be read or written
-
fov:
number# The Field of View of the camera, in degrees. A value between
SpaceCenter.Camera.min_fovandSpaceCenter.Camera.max_fov.- Attribute:
Can be read or written
-
min_pitch:
number# The minimum pitch of the camera.
- Attribute:
Read-only, cannot be set
-
max_pitch:
number# The maximum pitch of the camera.
- Attribute:
Read-only, cannot be set
-
min_distance:
number# Minimum distance from the camera to the subject, in meters.
- Attribute:
Read-only, cannot be set
-
max_distance:
number# Maximum distance from the camera to the subject, in meters.
- Attribute:
Read-only, cannot be set
-
min_fov:
number# The minimum field of view the camera in degrees.
- Attribute:
Read-only, cannot be set
-
max_fov:
number# The maximum field of view the camera in degrees.
- Attribute:
Read-only, cannot be set
-
default_distance:
number# Default distance from the camera to the subject, in meters.
- Attribute:
Read-only, cannot be set
-
default_fov:
number# The default field of view the camera in degrees.
- Attribute:
Read-only, cannot be set
-
focussed_body:
SpaceCenter.CelestialBody|nil# In map mode, the celestial body that the camera is focussed on. Returns
nilif the camera is not focussed on a celestial body. ThrowsKRPC.InvalidOperationExceptionif the camera is not in map mode.- Attribute:
Can be read or written
-
focussed_vessel:
SpaceCenter.Vessel|nil# In map mode, the vessel that the camera is focussed on. Returns
nilif the camera is not focussed on a vessel. ThrowsKRPC.InvalidOperationExceptionif the camera is not in map mode.- Attribute:
Can be read or written
-
focussed_node:
SpaceCenter.Node|nil# In map mode, the maneuver node that the camera is focussed on. Returns
nilif the camera is not focussed on a maneuver node. ThrowsKRPC.InvalidOperationExceptionif the camera is not in map mode.- Attribute:
Can be read or written
-
focussed_crew_member:
SpaceCenter.CrewMember|nil# In IVA mode, the crew member whose view the camera is showing. Returns
nilif no crew member is in view. ThrowsKRPC.InvalidOperationExceptionif the camera is not in IVA mode. Setting this moves the view to the given crew member, switching the camera to IVA mode if it is not already. The crew member must be in the active vessel, and in a part whose interior the game has placed them in.- Attribute:
Can be read or written
-
mode:
- class SpaceCenter.CameraMode#
-
- automatic#
The camera is showing the active vessel, in “auto” mode.
- free#
The camera is showing the active vessel, in “free” mode.
- chase#
The camera is showing the active vessel, in “chase” mode.
- locked#
The camera is showing the active vessel, in “locked” mode.
- orbital#
The camera is showing the active vessel, in “orbital” mode.
- iva#
The Intra-Vehicular Activity view is being shown.
- map#
The map view is being shown.