# Set Camera Channel

Grammar — Set model camera name from u for player player to render-to-texture channel channel using aspect ratio aspectRatio|AspectRatio.
FlagsNative | Action

Sets a model camera for the specified unit to be rendered to the specified render-to-texture channel.

# Arguments

  • int — Player
  • unit — CameraUnit
  • string<modelcamera> — Camera Name
  • int — Channel
  • fixed — Aspect Ratio

Returns — void

native void CameraSetChannel(
	int player,
	unit cameraUnit,
	string cameraName,
	int channel,
	fixed aspectRatio,
);

Category: Camera / Model Cameras

# Examples

campaigns/void.sc2campaignbase.sc2maps/maps/campaign/void/pstory01.sc2map/MapScript.galaxy:1192

    UnitSetScale(libVCST_gf_ClickableUnit("DTLeader"), 110.0, 110.0, 110.0);
    gf_SetBridgeEnviromentLighting();
    CameraSetChannel(1, libVCST_gf_ClickableUnit("BridgeConsole"), "SMC2_Bridge_Communicator_Camera", 1, 1.0);
    libVCST_gf_ToggleInteractives(true);
    UISetFrameVisible(PlayerGroupAll(), c_syncFrameTypeBattleUI, true);

campaigns/void.sc2campaign/base.sc2maps/maps/campaign/void/pstory01.sc2mapMapScript.galaxy:1192

    UnitSetScale(libVCST_gf_ClickableUnit("DTLeader"), 110.0, 110.0, 110.0);
    gf_SetBridgeEnviromentLighting();
    CameraSetChannel(1, libVCST_gf_ClickableUnit("BridgeConsole"), "SMC2_Bridge_Communicator_Camera", 1, 1.0);
    libVCST_gf_ToggleInteractives(true);
    UISetFrameVisible(PlayerGroupAll(), c_syncFrameTypeBattleUI, true);

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOMI.galaxy:6634

        libCOMI_gv_cM_ZeratulProphecyCamera = UnitLastCreated();
        libNtve_gf_ShowHideUnit(libCOMI_gv_cM_ZeratulProphecyCamera, false);
        CameraSetChannel(libCOMI_gv_cM_ZeratulPlayer, libCOMI_gv_cM_ZeratulProphecyCamera, "Camera_Basic", 1, 1.0);
    }
}