# Unit Group Followed By Camera
Grammar — Unit group that player player is following with the camera
Flags —Native
|Function
Follows a unit group with the camera.
# Arguments
int
— Player
Returns — unitgroup
native unitgroup CameraFollowUnitGroupGet(int player);
# Related
Category: Camera / Camera Tricks
- Lock Camera Input —
void
— CameraLockInput - Set Camera Bounds —
void
— CameraSetBounds - Shake Camera —
void
— CameraShakeStart - Shake Camera Using Preset —
void
— CameraShake - Stop Shaking Camera —
void
— CameraShakeStop - Zoom Camera —
void
— libNtve_gf_SwooshCamera - Follow Unit Group with Camera —
void
— CameraFollowUnitGroup - Unit Group Followed By Camera —
unitgroup
— CameraFollowUnitGroupGet - Force Follow Unit Group with Camera —
void
— CameraForceFollowUnitGroup - Make Camera Look At And Follow Unit —
void
— CameraLookAtUnit - Make Camera Look At And Follow Actor —
void
— CameraLookAtActor - Lock Camera Mouse Relative Mode On/Off —
void
— CameraForceMouseRelative - Turn Camera Mouse Rotation On/Off —
void
— CameraSetMouseRotates - Set Camera Mouse Rotation Speed —
void
— CameraSetMouseRotationSpeed - Turn Camera Height Displacement On/Off —
void
— CameraUseHeightDisplacement - Turn Camera Height Smoothing On/Off —
void
— CameraUseHeightSmoothing - Turn Camera Vertical Field Of View On/Off —
void
— CameraSetVerticalFieldOfView
# Examples
mods/heroesbrawlmods/arenamodemods/arenamode.stormmod — base.stormdata/LibAREN.galaxy:762
autoBF8A0686_var = PlayerGroupNextPlayer(autoBF8A0686_g, autoBF8A0686_var);
if (autoBF8A0686_var<0) { break; }
CameraFollowUnitGroup(autoBF8A0686_var, CameraFollowUnitGroupGet(autoBF8A0686_var), false, false);
libGame_gf_CameraPanCameraForPlayerAndUpdateMapBoundsIfNecessary(autoBF8A0686_var, UnitGetPosition(libGame_gv_teams[lv_losingTeam].lv_core), libGame_gv_gameOver_CameraPanTime_C, -1, 10, false);
}
mods/heroesbrawlmods/arenamodemods/attackdefend.stormmod — base.stormdata/LibAtDe.galaxy:157
auto4F553357_var = PlayerGroupNextPlayer(auto4F553357_g, auto4F553357_var);
if (auto4F553357_var<0) { break; }
CameraFollowUnitGroup(auto4F553357_var, CameraFollowUnitGroupGet(auto4F553357_var), false, false);
libGame_gf_CameraPanCameraForPlayerAndUpdateMapBoundsIfNecessary(auto4F553357_var, libGame_gv_players[auto4F553357_var].lv_spawnPoint, 0.0, -1, 10, false);
}
mods/heroesbrawlmods/arenamodemods/trialgrounds.stormmod — base.stormdata/LibAMVS.galaxy:348
auto6A7946D4_var = PlayerGroupNextPlayer(auto6A7946D4_g, auto6A7946D4_var);
if (auto6A7946D4_var<0) { break; }
CameraFollowUnitGroup(auto6A7946D4_var, CameraFollowUnitGroupGet(auto6A7946D4_var), false, false);
libGame_gf_CameraPanCameraForPlayerAndUpdateMapBoundsIfNecessary(auto6A7946D4_var, lp_deadUnit, libGame_gv_gameOver_CameraPanTime_C, -1, 10, false);
}
mods/heroesbrawlmods/arenamodemods/trialgrounds.stormmod — base.stormdata/LibAMVS.galaxy:358
auto218DEA82_var = PlayerGroupNextPlayer(auto218DEA82_g, auto218DEA82_var);
if (auto218DEA82_var<0) { break; }
CameraFollowUnitGroup(auto218DEA82_var, CameraFollowUnitGroupGet(auto218DEA82_var), false, false);
libGame_gf_CameraPanCameraForPlayerAndUpdateMapBoundsIfNecessary(auto218DEA82_var, UnitGetPosition(lp_killingUnit), 30.0, -1, 10, false);
}
mods/heroesbrawlmods/brawlmapmods/blackheartsrevenge.stormmod — base.stormdata/LibMDoE.galaxy:226
autoC56B2D95_var = PlayerGroupNextPlayer(autoC56B2D95_g, autoC56B2D95_var);
if (autoC56B2D95_var<0) { break; }
CameraFollowUnitGroup(autoC56B2D95_var, CameraFollowUnitGroupGet(autoC56B2D95_var), false, false);
libGame_gf_CameraPanCameraForPlayerAndUpdateMapBoundsIfNecessary(autoC56B2D95_var, UnitGetPosition(EventUnit()), libGame_gv_gameOver_CameraPanTime_C, -1, 10, false);
}
mods/heroesbrawlmods/brawlmapmods/blackheartsrevenge.stormmod — base.stormdata/LibMDoE.galaxy:2368
autoD01FF052_var = PlayerGroupNextPlayer(autoD01FF052_g, autoD01FF052_var);
if (autoD01FF052_var<0) { break; }
CameraFollowUnitGroup(autoD01FF052_var, CameraFollowUnitGroupGet(autoD01FF052_var), false, false);
libGame_gf_CameraPanCameraForPlayerAndUpdateMapBoundsIfNecessary(autoD01FF052_var, UnitGetPosition(EventUnit()), libGame_gv_gameOver_CameraPanTime_C, -1, 10, false);
}
mods/heroesbrawlmods/brawlmapmods/coop/pvebrawlmod.stormmod — base.stormdata/LibPVEB.galaxy:1277
lv_itPlayer = PlayerGroupNextPlayer(auto967A0373_g, lv_itPlayer);
if (lv_itPlayer<0) { break; }
CameraFollowUnitGroup(lv_itPlayer, CameraFollowUnitGroupGet(lv_itPlayer), false, false);
if ((lp_victoryLocation != null)) {
libGame_gf_CameraPanCameraForPlayerAndUpdateMapBoundsIfNecessary(lv_itPlayer, lp_victoryLocation, libGame_gv_gameOver_CameraPanTime_C, -1, 10, false);
mods/heroesbrawlmods/brawlmapmods/coop/pvemod.stormmod — base.stormdata/LibPVEM.galaxy:1394
lv_itPlayer = PlayerGroupNextPlayer(auto967A0373_g, lv_itPlayer);
if (lv_itPlayer<0) { break; }
CameraFollowUnitGroup(lv_itPlayer, CameraFollowUnitGroupGet(lv_itPlayer), false, false);
if ((lp_victoryLocation != null)) {
libGame_gf_CameraPanCameraForPlayerAndUpdateMapBoundsIfNecessary(lv_itPlayer, lp_victoryLocation, libGame_gv_gameOver_CameraPanTime_C, -1, 10, false);
mods/heroesbrawlmods/brawlmapmods/pullparty.stormmod — base.stormdata/LibMMPP.galaxy:74
autoC59C0280_var = PlayerGroupNextPlayer(autoC59C0280_g, autoC59C0280_var);
if (autoC59C0280_var<0) { break; }
CameraFollowUnitGroup(autoC59C0280_var, CameraFollowUnitGroupGet(autoC59C0280_var), false, false);
libGame_gf_CameraPanCameraForPlayerAndUpdateMapBoundsIfNecessary(autoC59C0280_var, UnitGetPosition(lp_deadUnit), 2.0, -1, 10, false);
}
mods/heroesdata.stormmod — base.stormdata/TriggerLibs/GameLib.galaxy:1076
if ((libGame_gv_players[lp_player].lv_cameraForcedLock == true) && (libGame_gv_players[lp_player].lv_cameraPlayerUnitGroupToFocusOn != null)) {
libGame_gv_players[lp_player].lv_cameraCurrentTargetGroup = libGame_gv_players[lp_player].lv_cameraPlayerUnitGroupToFocusOn;
CameraFollowUnitGroup(lp_player, CameraFollowUnitGroupGet(lp_player), false, false);
CameraFollowUnitGroup(lp_player, libGame_gv_players[lp_player].lv_cameraCurrentTargetGroup, true, false);
if (((lp_player != 1) || (libCore_gv_sYSGameMode != libCore_ge_GameModes_Tutorial1Deprecated))) {
mods/heroesdata.stormmod — base.stormdata/TriggerLibs/GameLib.galaxy:1087
libGame_gv_players[lp_player].lv_cameraCurrentTargetGroup = libGame_gv_players[lv_playerBeingTracked].lv_cameraPlayerUnitGroupToFocusOn;
libGame_gf_CameraPanCameraForPlayerAndUpdateMapBoundsIfNecessary(lp_player, UnitGroupCenterOfGroup(libGame_gv_players[lp_player].lv_cameraCurrentTargetGroup), 0.0, -1, 0.0, false);
CameraFollowUnitGroup(lp_player, CameraFollowUnitGroupGet(lp_player), false, false);
CameraFollowUnitGroup(lp_player, libGame_gv_players[lp_player].lv_cameraCurrentTargetGroup, true, false);
PlayerOptionOverride(lp_player, "camerafollow", "1");
mods/heroesdata.stormmod — base.stormdata/TriggerLibs/GameLib.galaxy:1095
libGame_gv_players[lp_player].lv_cameraCurrentTargetGroup = libGame_gv_players[lp_player].lv_cameraPlayerUnitGroupToFocusOn;
libGame_gf_CameraPanCameraForPlayerAndUpdateMapBoundsIfNecessary(lp_player, UnitGroupCenterOfGroup(libGame_gv_players[lp_player].lv_cameraCurrentTargetGroup), 0.0, -1, 0.0, false);
CameraFollowUnitGroup(lp_player, CameraFollowUnitGroupGet(lp_player), false, false);
CameraFollowUnitGroup(lp_player, libGame_gv_players[lp_player].lv_cameraCurrentTargetGroup, true, false);
PlayerOptionOverride(lp_player, "camerafollow", "1");
mods/heroesdata.stormmod — base.stormdata/TriggerLibs/GameLib.galaxy:1103
libGame_gv_players[lp_player].lv_cameraCurrentTargetGroup = null;
PlayerOptionOverride(lp_player, "camerafollow", "0");
CameraFollowUnitGroup(lp_player, CameraFollowUnitGroupGet(lp_player), false, false);
}
else {
mods/heroesdata.stormmod — base.stormdata/TriggerLibs/GameLib.galaxy:1108
if ((UnitHasBehavior2(libGame_gv_players[lp_player].lv_heroUnit, "LeoricUndying") == false) && (libGame_gv_players[lp_player].lv_isDead == true)) {
libGame_gv_players[lp_player].lv_cameraCurrentTargetGroup = libGame_gv_players[lp_player].lv_cameraPlayerUnitGroupToFocusOn;
CameraFollowUnitGroup(lp_player, CameraFollowUnitGroupGet(lp_player), false, false);
CameraFollowUnitGroup(lp_player, libGame_gv_players[lp_player].lv_cameraCurrentTargetGroup, true, false);
}
mods/heroesdata.stormmod — base.stormdata/TriggerLibs/GameLib.galaxy:1117
else {
libGame_gv_players[lp_player].lv_cameraCurrentTargetGroup = libGame_gv_players[lp_player].lv_cameraPlayerUnitGroupToFocusOn;
CameraFollowUnitGroup(lp_player, CameraFollowUnitGroupGet(lp_player), false, false);
CameraFollowUnitGroup(lp_player, libGame_gv_players[lp_player].lv_cameraCurrentTargetGroup, true, false);
}
mods/heroesdata.stormmod — base.stormdata/TriggerLibs/GameLib.galaxy:19115
autoB8F084BF_var = PlayerGroupNextPlayer(autoB8F084BF_g, autoB8F084BF_var);
if (autoB8F084BF_var<0) { break; }
CameraFollowUnitGroup(autoB8F084BF_var, CameraFollowUnitGroupGet(autoB8F084BF_var), false, false);
libGame_gf_CameraPanCameraForPlayerAndUpdateMapBoundsIfNecessary(autoB8F084BF_var, UnitGetPosition(EventUnit()), libGame_gv_gameOver_CameraPanTime_C, -1, 10, false);
}