Skip to content

MASCamera

MOARdV edited this page May 29, 2017 · 10 revisions

The MASCamera module represents a camera installed on a part. The camera may be accessed in a MASMonitor prop module's page. The MASCamera is similar to the JSIExternalCameraSelector, but there are important changes to be aware of:

  • Camera parameters (zoom limits, pan and tilt limits) are part of MASCamera. In RPM, they were part of the page definition, allowing different pages to use different values for the same camera. Putting the limits in the part config better duplicates a physical camera, and it allows the part maker to specify limits based on what the part is emulating.
  • Camera names are user-configurable in the VAB/SPH (or in flight) using a text input box. RPM used a named prefix (traditionally, "ExtCam"), and it allowed the user to increment or decrement a number that was added to the prefix.

The MASCamera is configured with the following values. All user-configurable values and their defaults are included.

MODULE
{
	name = MASCamera

	fovRange = 50, 50
	currentFov = 50
	panRange = 0, 0
	currentPan = 0
	tiltRange = 0, 0
	currentTilt = 0
	cameraTransformName = ""
	translation = 0, 0, 0
	rotation = 0, 0, 0
	cameraName = ""
	showFov = false
}
  • fovRange - Defines the minimum and maximum field of view for the camera, in degrees.
  • currentFov - This value will change in flight if the user zooms a camera, but putting it in the part config allows the part maker to specify the initial setting for the part.
  • panRange - Defines the maximum left and right rotation of the camera, in degrees.
  • currentPan - This value will change in flight if the user pans a camera.
  • tiltRange - Defines the maximum up and down rotation of the camera, in degrees.
  • currentTilt - This value will change in flight if the user tilts a camera.
  • cameraTransformName - Required. Specifies the transform in the prop where the camera is attached. The following two fields allow the camera to be moved and rotated from that location.
  • translation - Specifies the offset from cameraTransformName where the camera should be created.
  • rotation - Specifies the rotation (in degrees) that the camera should be rotated from cameraTransformName's forward (blue) axis.
  • cameraName - A user-configurable field naming the camera. An initial default name may be provided in the config.
  • showFov - Whether the field-of-view cones should be visible in the VAB/SPH. This option is controlled by the player using the context menu in the VAB/SPH, and it should not be added to the config file.

Clone this wiki locally