# Camera Pitch of Player

Grammar — Current camera pitch of player player
FlagsNative | Function

Returns the current camera pitch of a player. Camera pitch is tracked for all players in a multiplayer game, but the queried locations will be slightly old due to network latency.

# Arguments

  • int — Player

Returns — fixed

native fixed CameraGetPitch(int player);

Category: Camera / Basic

# Examples

campaigns/voidstory.sc2campaignbase.sc2data/TriggerLibs/VoidCampaignMissionLib.galaxy:4832


    lv_cameraPosition[0] = PointGetX(CameraGetTarget(1));
    lv_cameraPosition[1] = (PointGetY(CameraGetTarget(1))-(Cos(CameraGetPitch(1))*CameraGetDistance(1)));
    lv_cameraPosition[2] = (WorldHeight(c_heightMapGround, CameraGetTarget(1))+(Sin(CameraGetPitch(1))*CameraGetDistance(1)));
    lv_effectPosition[0] = PointGetX(EventPlayerEffectUsedPoint(c_effectLocationTargetPoint));

campaigns/voidstory.sc2campaignbase.sc2data/TriggerLibs/VoidCampaignMissionLib.galaxy:4833

    lv_cameraPosition[0] = PointGetX(CameraGetTarget(1));
    lv_cameraPosition[1] = (PointGetY(CameraGetTarget(1))-(Cos(CameraGetPitch(1))*CameraGetDistance(1)));
    lv_cameraPosition[2] = (WorldHeight(c_heightMapGround, CameraGetTarget(1))+(Sin(CameraGetPitch(1))*CameraGetDistance(1)));
    lv_effectPosition[0] = PointGetX(EventPlayerEffectUsedPoint(c_effectLocationTargetPoint));
    lv_effectPosition[1] = PointGetY(EventPlayerEffectUsedPoint(c_effectLocationTargetPoint));

mods/novastoryassets.sc2modbase3.sc2maps/maps/campaign/nova/nova09.sc2map/MapScript.galaxy:4632


    lv_cameraPosition[0] = PointGetX(CameraGetTarget(1));
    lv_cameraPosition[1] = (PointGetY(CameraGetTarget(1))-(Cos(CameraGetPitch(1))*CameraGetDistance(1)));
    lv_cameraPosition[2] = (WorldHeight(c_heightMapGround, CameraGetTarget(1))+(Sin(CameraGetPitch(1))*CameraGetDistance(1)));
    lv_effectPosition[0] = PointGetX(EventPlayerEffectUsedPoint(c_effectLocationTargetPoint));

mods/novastoryassets.sc2modbase3.sc2maps/maps/campaign/nova/nova09.sc2map/MapScript.galaxy:4633

    lv_cameraPosition[0] = PointGetX(CameraGetTarget(1));
    lv_cameraPosition[1] = (PointGetY(CameraGetTarget(1))-(Cos(CameraGetPitch(1))*CameraGetDistance(1)));
    lv_cameraPosition[2] = (WorldHeight(c_heightMapGround, CameraGetTarget(1))+(Sin(CameraGetPitch(1))*CameraGetDistance(1)));
    lv_effectPosition[0] = PointGetX(EventPlayerEffectUsedPoint(c_effectLocationTargetPoint));
    lv_effectPosition[1] = PointGetY(EventPlayerEffectUsedPoint(c_effectLocationTargetPoint));

mods/novastoryassets.sc2mod/base3.sc2maps/maps/campaign/nova/nova09.sc2mapMapScript.galaxy:4632


    lv_cameraPosition[0] = PointGetX(CameraGetTarget(1));
    lv_cameraPosition[1] = (PointGetY(CameraGetTarget(1))-(Cos(CameraGetPitch(1))*CameraGetDistance(1)));
    lv_cameraPosition[2] = (WorldHeight(c_heightMapGround, CameraGetTarget(1))+(Sin(CameraGetPitch(1))*CameraGetDistance(1)));
    lv_effectPosition[0] = PointGetX(EventPlayerEffectUsedPoint(c_effectLocationTargetPoint));

mods/novastoryassets.sc2mod/base3.sc2maps/maps/campaign/nova/nova09.sc2mapMapScript.galaxy:4633

    lv_cameraPosition[0] = PointGetX(CameraGetTarget(1));
    lv_cameraPosition[1] = (PointGetY(CameraGetTarget(1))-(Cos(CameraGetPitch(1))*CameraGetDistance(1)));
    lv_cameraPosition[2] = (WorldHeight(c_heightMapGround, CameraGetTarget(1))+(Sin(CameraGetPitch(1))*CameraGetDistance(1)));
    lv_effectPosition[0] = PointGetX(EventPlayerEffectUsedPoint(c_effectLocationTargetPoint));
    lv_effectPosition[1] = PointGetY(EventPlayerEffectUsedPoint(c_effectLocationTargetPoint));

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

        lv_cameraTargetPoint = CameraGetTarget(lv_player);
        lv_cameraPosition[0] = PointGetX(lv_cameraTargetPoint);
        lv_cameraPosition[1] = (PointGetY(lv_cameraTargetPoint)-(Cos(CameraGetPitch(lv_player))*CameraGetDistance(lv_player)));
        lv_cameraPosition[2] = (WorldHeight(c_heightMapGround, lv_cameraTargetPoint)+(Sin(CameraGetPitch(lv_player))*CameraGetDistance(lv_player)));
        lv_distance = SquareRoot((Pow((lv_cameraPosition[0]-lv_effectPosition[0]), 2.0) + Pow((lv_cameraPosition[1]-lv_effectPosition[1]), 2.0) + Pow((lv_cameraPosition[2]-lv_effectPosition[2]), 2.0)));

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

        lv_cameraPosition[0] = PointGetX(lv_cameraTargetPoint);
        lv_cameraPosition[1] = (PointGetY(lv_cameraTargetPoint)-(Cos(CameraGetPitch(lv_player))*CameraGetDistance(lv_player)));
        lv_cameraPosition[2] = (WorldHeight(c_heightMapGround, lv_cameraTargetPoint)+(Sin(CameraGetPitch(lv_player))*CameraGetDistance(lv_player)));
        lv_distance = SquareRoot((Pow((lv_cameraPosition[0]-lv_effectPosition[0]), 2.0) + Pow((lv_cameraPosition[1]-lv_effectPosition[1]), 2.0) + Pow((lv_cameraPosition[2]-lv_effectPosition[2]), 2.0)));
        CameraShakeStart(lv_player, c_cameraPositionTarget, c_cameraDirectionZ, MaxF((1-(lv_distance/50)), 0.0), 5.0, 100.0, 0.5);

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

    lv_cameraTargetPoint = CameraGetTarget(lv_player);
    lv_cameraPosition[0] = PointGetX(lv_cameraTargetPoint);
    lv_cameraPosition[1] = (PointGetY(lv_cameraTargetPoint)-(Cos(CameraGetPitch(lv_player))*CameraGetDistance(lv_player)));
    lv_cameraPosition[2] = (WorldHeight(c_heightMapGround, lv_cameraTargetPoint)+(Sin(CameraGetPitch(lv_player))*CameraGetDistance(lv_player)));
    lv_effectPosition[0] = PointGetX(lv_effectTargetPoint);

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

    lv_cameraPosition[0] = PointGetX(lv_cameraTargetPoint);
    lv_cameraPosition[1] = (PointGetY(lv_cameraTargetPoint)-(Cos(CameraGetPitch(lv_player))*CameraGetDistance(lv_player)));
    lv_cameraPosition[2] = (WorldHeight(c_heightMapGround, lv_cameraTargetPoint)+(Sin(CameraGetPitch(lv_player))*CameraGetDistance(lv_player)));
    lv_effectPosition[0] = PointGetX(lv_effectTargetPoint);
    lv_effectPosition[1] = PointGetY(lv_effectTargetPoint);