=====AddSubCamera===== ====Summary==== This function allows you to add a sub-camera to the scene. The sub camera can either be a //World// camera or //Feed// camera. //World// cameras produce footage from a virtual position within the scene, whereas //Feed// cameras obtain footage from a live streaming location such as the internet or local security camera. ====Parameters==== ===Type=== //Type: Text Default: **World**// This parameter determines the type of sub-camera to add to the scene. There are 2 types of subcamera: ^Type^Definition^ |**World**|Creates a 3D virtual camera in the scene in a specific 3D position and rotation to view a dedicated part of the scene.| |**Feed**|Creates a camera that obtains footage from live streaming feed.| ===Name=== //Type: Text Default: None// The name of the camera. This value can be referred to later to either remove or modify the camera. ===FeedName=== //Type: Text Default: None// The name of the streaming feed to be streamed if this camera is defined as type //Feed//. ===AttachTo=== //Type: Text Default: None// Specifies the //name// or ARDI ID of another asset for which this asset is to be parented to. If using an asset ID, begin the target with the '#' character. //This parameter is optional// If defined, this sub-camera will be parented to the specified asset and it's //position// will be converted to local co-ordinates around the parent asset. ===Position=== //Type: [[XYZ Coordinates]] Default: None// Specifies the X,Y,Z location to place the camera in the scene. If undefined, the camera will be placed on the position of the main camera. [[XYZ Coordinates]] must be defined as separated with a ','. For example: a value of "10,4,6" will place the camera 10 units along the X plane, 4 units along the Y plane and 6 units along the Z plane. ===Rotation=== //Type: [[XYZ Coordinates]] Default: None// Specifies the X,Y and Z rotational values to rotate the camera. If undefined, the camera will use the rotation of the main camera. [[XYZ Coordinates]] must be defined as separated with a ','. For example: a value of "45,90,180" will rotate the camera 45 degrees along the X axis, 90 degrees along the Y axis and 180 degrees along the Z axis. ====See Also==== [[removesubcamera]] [[removelastsubcamera]] ====Examples==== > This code creates a sub-camera of type **Feed**, it assigns the camera the name **SecurityFeed** and looks for the live streaming feed called **SecurityCam12** to produce imagery on screen. > This code adds a sub-camera to the scene of type **World** at a position of **100,200,300** and a rotation of **90** degrees along the X axis. The sub-camera is given the name **MyNewCam**. > The script then waits for a click for a user before calling the //RemoveSubCamera// function. It passes a Name value of **MyNewCam** which will find the previously created camera of the same name and remove it.