-
Notifications
You must be signed in to change notification settings - Fork 69
Part modules
A few of the modules in the package are actually part modules and go into part.cfg to support the function of IVA components:
It may often be desirable to provide the user with an option to place a camera elsewhere on the vessel, but then you have to provide a part for it, since cameras require a named transform to work from. If you want to have a lot of cameras, as many people seem to prefer, it would require creating lots of parts with individual models, which feels like kind of a waste. This PartModule permits the user to switch the camera ID between a set of predefined names by right-clicking the camera part itself. The selected IDs will persist.
To work, the module requires the camera object to have a named transform which has a child transform. The name of the child transform does not matter, as it is getting renamed as soon as the vessel loads, but you probably want it's orientation to be the same as that of the parent transform, otherwise the camera might end up pointing not where you expect. Configuration:
- cameraContainer -- Name of the parent transform that has a child transform that will be the actual camera transform.
- cameraIDPrefix -- Defaults to "ExtCam"
- maximum -- Maximum camera ID the user will be permitted, defaults to 8.
The generated camera names will have the form <cameraIDPrefix><number>, camera numbering starts with 1, so on the first launch of the vessel the camera will by default be named "ExtCam1" and allow switching all the way up to "ExtCam8". You probably want to have your own name prefix.
In editor, the part with this module enabled will display a light cone indicating the general direction of what it will be seeing, with the default field of view angle of 60 degrees. Pressing space in editor while the mouse pointer is over the camera will increment it's ID by one, allowing the user to preselect camera IDs while building. Holding down U (or whatever the light toggle button is mapped to) will display the field of view of all cameras at once.