-
Notifications
You must be signed in to change notification settings - Fork 16
Setting up cameras
Every monitor page can have a cameraTransform
option.
When such a page is activated, the plugin will attempt to find a transform by that name anywhere within the vessel, outside the IVA -- it can't be on the internal space model -- and place there a camera structure that closely mimics KSP's flight camera, so you should get the picture equivalent to what you would see from outside. The search is started with the pod itself, but continues throughout the vessel. It is re-done every time you switch to a different page. If the part where that transform was found falls off, the camera should smoothly stop working. The recommended place for cameras is the outer model of the pod itself, because that, at least, avoids the inconvenient question "so what if I have more than one pod trying to look through the same outer camera object". They won't conflict, but you might not see what you expect. If you set up cameras on transforms with non-unique names that are on parts other than the pod exterior, there's no telling which will be found first. Look into JSIExternalCameraSelector module (see Part modules) if you want to make bolt-on external camera models, because it's meant to solve precisely that problem.
Cameras will be pointing in the Z+ direction of the transform, with X+ towards the right of the field of view, and will move if the transform itself moves. Rendering will occur at the moment when the screen would otherwise be cleared with the blanking color. If your font has an alpha background, it will overprint the camera image just like one would expect.
The camera's aspect ratio is set in the RasterPropMonitor module, using the cameraAspect = ...
option, so you can tune the aspect ratio to your monitor's size. A perfectly proportioned 4:3 screen has a cameraAspect of ~1.3333.
Everything else about the camera is set up within page definition blocks.