Camera#
- class SpaceCenter.Camera()#
Controls the game’s camera. Obtained by calling
SpaceCenter.getCamera().- Camera.getMode()#
- Camera.setMode(value)#
The current mode of the camera.
- Property:
Can be read or written
- Return type:
- Game Scenes:
Flight
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.
- Camera.nextCamera()#
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.
- Game Scenes:
Flight
- Camera.previousCamera()#
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.
- Game Scenes:
Flight
- Camera.getPitch()#
- Camera.setPitch(value)#
The pitch of the camera, in degrees. A value between
SpaceCenter.Camera.getMinPitch()andSpaceCenter.Camera.getMaxPitch()- Property:
Can be read or written
- Return type:
number- Game Scenes:
Flight
- Camera.getHeading()#
- Camera.setHeading(value)#
The heading of the camera, in degrees.
- Property:
Can be read or written
- Return type:
number- Game Scenes:
Flight
- Camera.getDistance()#
- Camera.setDistance(value)#
The distance from the camera to the subject, in meters. A value between
SpaceCenter.Camera.getMinDistance()andSpaceCenter.Camera.getMaxDistance().- Property:
Can be read or written
- Return type:
number- Game Scenes:
Flight
- Camera.getFoV()#
- Camera.setFoV(value)#
The Field of View of the camera, in degrees. A value between
SpaceCenter.Camera.getMinFoV()andSpaceCenter.Camera.getMaxFoV().- Property:
Can be read or written
- Return type:
number- Game Scenes:
Flight
- Camera.getMinPitch()#
The minimum pitch of the camera.
- Property:
Read-only, cannot be set
- Return type:
number- Game Scenes:
Flight
- Camera.getMaxPitch()#
The maximum pitch of the camera.
- Property:
Read-only, cannot be set
- Return type:
number- Game Scenes:
Flight
- Camera.getMinDistance()#
Minimum distance from the camera to the subject, in meters.
- Property:
Read-only, cannot be set
- Return type:
number- Game Scenes:
Flight
- Camera.getMaxDistance()#
Maximum distance from the camera to the subject, in meters.
- Property:
Read-only, cannot be set
- Return type:
number- Game Scenes:
Flight
- Camera.getMinFoV()#
The minimum field of view the camera in degrees.
- Property:
Read-only, cannot be set
- Return type:
number- Game Scenes:
Flight
- Camera.getMaxFoV()#
The maximum field of view the camera in degrees.
- Property:
Read-only, cannot be set
- Return type:
number- Game Scenes:
Flight
- Camera.getDefaultDistance()#
Default distance from the camera to the subject, in meters.
- Property:
Read-only, cannot be set
- Return type:
number- Game Scenes:
Flight
- Camera.getDefaultFoV()#
The default field of view the camera in degrees.
- Property:
Read-only, cannot be set
- Return type:
number- Game Scenes:
Flight
- Camera.getFocussedBody()#
- Camera.setFocussedBody(value)#
In map mode, the celestial body that the camera is focussed on. Returns
nullif the camera is not focussed on a celestial body. ThrowsKRPC.InvalidOperationExceptionif the camera is not in map mode.- Property:
Can be read or written
- Return type:
SpaceCenter.CelestialBodyornull- Game Scenes:
Flight
- Camera.getFocussedVessel()#
- Camera.setFocussedVessel(value)#
In map mode, the vessel that the camera is focussed on. Returns
nullif the camera is not focussed on a vessel. ThrowsKRPC.InvalidOperationExceptionif the camera is not in map mode.- Property:
Can be read or written
- Return type:
SpaceCenter.Vesselornull- Game Scenes:
Flight
- Camera.getFocussedNode()#
- Camera.setFocussedNode(value)#
In map mode, the maneuver node that the camera is focussed on. Returns
nullif the camera is not focussed on a maneuver node. ThrowsKRPC.InvalidOperationExceptionif the camera is not in map mode.- Property:
Can be read or written
- Return type:
SpaceCenter.Nodeornull- Game Scenes:
Flight
- Camera.getFocussedCrewMember()#
- Camera.setFocussedCrewMember(value)#
In IVA mode, the crew member whose view the camera is showing. Returns
nullif 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.- Property:
Can be read or written
- Return type:
SpaceCenter.CrewMemberornull- Game Scenes:
Flight
- class SpaceCenter.CameraMode()#
See
SpaceCenter.Camera.getMode().- CameraMode.automatic#
The camera is showing the active vessel, in “auto” mode.
- CameraMode.free#
The camera is showing the active vessel, in “free” mode.
- CameraMode.chase#
The camera is showing the active vessel, in “chase” mode.
- CameraMode.locked#
The camera is showing the active vessel, in “locked” mode.
- CameraMode.orbital#
The camera is showing the active vessel, in “orbital” mode.
- CameraMode.iva#
The Intra-Vehicular Activity view is being shown.
- CameraMode.map#
The map view is being shown.