GSC reference › Built-in
GetPlayerCameraPos()
Built-in (engine)
Server
Player Called on: player
Get the player's camera position
Signature
<player> GetPlayerCameraPos()
Called on an entity: player GetPlayerCameraPos(...)
Example (from Treyarch's docs)
vieworg = player GetPlayerCameraPos()
Real uses in BO3's scripts
Called 19 times in the decompiled scripts. A few, zombies first:
- scripts/zm/_zm_weap_staff_air.gsc, line 736
fire_origin = self getplayercamerapos(); - scripts/zm/_zm_weap_staff_water.gsc, line 675
fire_origin = self getplayercamerapos(); - scripts/zm/craftables/_zm_craftables.gsc, line 3129
playfx(level._effect["building_dust"], player getplayercamerapos(), player.angles); - scripts/zm/zm_castle_weap_quest_upgrade.gsc, line 3891
v_eye_origin = self getplayercamerapos(); - scripts/zm/zm_challenges_tomb.gsc, line 684
v_eye_origin = player getplayercamerapos();
Related built-ins
- CameraSetPosition()Sets the position of the script camera.
- PlayerPositionValidIgnoreEnt()Returns true if the passed in origin is valid for a spawn (ie not inside something).
- PlayerPositionValid()Returns true if the passed in origin is valid for a spawn (ie not inside something).
- GetPlayerAngles()Get the player view angles
- SetPlayerAngles()Set the player's view angles
- CameraActivate()Turns the script camera on or off.
- PlayerADS()Gets the player weapon position fraction
- IsPlayerOnSameMachine()Returns whether or not this player is on the same machine as the other player.
- CameraSetLookAt()Sets the focus point of the script camera.
- RevivePlayer()Callback from script to get player out of last stand, increases health, removes damage timer, should clear screen of damageFX
- StartCameraTween()Start a camera tween, call this right before a camera pop to do a blend.
- FinishPlayerDamage()Does damage to a player - usually as part of the damage callback
New to GSC?
Start with the basics, or paste a compile error to get the fix.
Built-in descriptions, parameters and examples come from Treyarch's BO3 mod tools docs. Usage links point at shiversoftdev/t7-source (decompiled BO3 scripts).