# Camera Distance of Player

Grammar — Current camera distance of player player
FlagsNative | Function

Returns the current camera distance of a player. Camera distance 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 CameraGetDistance(int player);

Category: Camera / Basic

# Examples

# campaigns/voidstory.sc2campaign

VoidCampaignMissionLib.galaxy

// L4832
CameraGetDistance(1)
// L4833
CameraGetDistance(1)

# mods/novastoryassets.sc2mod

MapScript.galaxy

// L4479
CameraGetDistance(1)
// L4480
CameraGetDistance(1)
// L4479
CameraGetDistance(1)
// L4480
CameraGetDistance(1)

# mods/starcoop/starcoop.sc2mod

LibCOMI.galaxy

// L25320
CameraGetDistance(lv_player)
// L25321
CameraGetDistance(lv_player)
// L29235
CameraGetDistance(lv_player)
// L29236
CameraGetDistance(lv_player)
// L33851
CameraGetDistance(lv_indexPlayer)