This article's documentation is for anything that uses the Source engine. Click here for more information.

Point viewcontrol: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
mNo edit summary
 
(61 intermediate revisions by 29 users not shown)
Line 1: Line 1:
[http://georgeswanigan.freeweb7.com/small/cum-filled-ass.html cum filled ass] [http://dungkinslow.infernohost.net/directory/gnomes.html gnomes] [http://alejandrinawhip.ourprofile.net/view/christopher-meloni.html christopher meloni] [http://paulareimann.infernohost.net/direct-satellite.htm direct satellite tv] [http://temptedlush.interfree.it/html/real-estate-mount.html real estate mount prospect illinois] [http://ileenbabb.totalh.com/data/facesitting.html facesitting videos] [http://temptedlush.interfree.it/html/samba-music-mp3.html samba music mp3] [http://zherezx.ayudauni.net/articles/silence.html silence] [http://lowukibiwo.fhpanel.com/white-trailer.html white trailer park trash women] [http://helanur.interfree.it/blog/zip-password-hacker.htm zip password hacker] [http://zzizlita.hostinggratisbrasil.com/sturgeon-pauls.html sturgeon pauls] [http://selinaswigert.friko.pl/pages/there-youll-be.html there youll be] [http://zzizlita.hostinggratisbrasil.com/tape-gag-women.html tape gag women] [http://daniellegowins.totalh.com/text/super-culo.html super culo] [http://yukohiatt.infernohost.net/fortune-cookies.html fortune cookies] [http://clarinepals.totalh.com/directory/road-atlas.htm road atlas] [http://yukohiatt.infernohost.net/jackpot-party.html jackpot party] [http://sujowirlo.fhpanel.com/otk-spanking.html otk spanking] [http://zherezx.ayudauni.net/articles/post-office-business.html post office business] [http://fowapvu.fhpanel.com/html/car-ratings.htm car ratings] [http://armandaabbott.totalh.com/comments/bounty-hunter.html bounty hunter] [http://cacophonysaint.w8w.pl/html/operating-instructions.htm operating instructions air conditioner] [http://armandaabbott.totalh.com/comments/buffy-fanfiction.html buffy fanfiction] [http://soonweddington.infernohost.net/content/used-engines.htm used engines] [http://cacophonysaint.w8w.pl/html/mean.htm mean] [http://argentinaperale.infernohost.net/nick-cannon.html nick cannon] [http://soonweddington.infernohost.net/content/call-center-technology.htm call center technology consultant] [http://pianoislove.ourprofile.net/directory/do-it.html do it] [http://lowukibiwo.fhpanel.com/big-foot.html big foot] [http://tucabello.infernohost.net/description/funny-photo.html funny photo] [http://doreengilleland.totalh.com/pages/aerith.html aerith] [http://chelsxd.ourprofile.net/keratosis.html keratosis] [http://alejandrinawhip.ourprofile.net/view/physical-science.html physical science] [http://kwowukxa.hostinggratisbrasil.com/young-teen-pics.html young teen pics] [http://lowukibiwo.fhpanel.com/pump-up-the-volume.html pump up the volume] [http://laniwgi.fhpanel.com/pelvic-exam.htm pelvic exam video clip] [http://quiris.interfree.it/carlos-and-charlies.html carlos and charlies] [http://zzizlita.hostinggratisbrasil.com/hirsute-ladies.html hirsute ladies] [http://cordiademby.w8w.pl/resources/fosamax-side-effects.html fosamax side effects] [http://zherezx.ayudauni.net/articles/marvel-heroes-list.html marvel heroes list] [http://danielantonio.freeweb7.com/lib/southwest-airline.html southwest airline cheap airfare] [http://tdtuamo.hostinggratisbrasil.com/resources/nancy-grace.html nancy grace] [http://tdtuamo.hostinggratisbrasil.com/resources/pre-teen-pantyhose.html pre teen pantyhose] [http://zzizlita.hostinggratisbrasil.com/viper.html viper] [http://lowukibiwo.fhpanel.com/womans-softball.html womans softball] [http://argentinaperale.infernohost.net/eroti.html eroti] [http://bernadinetrotta.indo.tc/hera.html hera] [http://lieselottehasse.infernohost.net/french-to-english.html french to english] [http://cordiademby.w8w.pl/resources/aerosmith-dude.html aerosmith dude looks like a lady] [http://laniwgi.fhpanel.com/voip-service.htm voip service] [http://cordiademby.w8w.pl/resources/el-creada-por.html el creada por seomundo] [http://paulareimann.infernohost.net/safe-sound-car.htm safe sound car audio] [http://menkeydarren.ayudauni.net/waste-veg-oil.html waste veg oil] [http://lieselottehasse.infernohost.net/secretary-sex.html secretary sex] [http://ramonapasko.friko.pl/wiki/really-small-boobs.html really small boobs] [http://meridemko.indo.tc/view/japanese-maple.html japanese maple] [http://tibuogoz.hostinggratisbrasil.com/html/i-think-were-alone.html i think were alone now tabs] [http://laniwgi.fhpanel.com/affective-disorder.htm affective disorder spectrum] [http://zherezx.ayudauni.net/articles/home-interior.html home interior decorating] [http://zzizlita.hostinggratisbrasil.com/women-flashing.html women flashing truckers] [http://bernadinetrotta.indo.tc/dragoness.html dragoness] [http://clarinepals.totalh.com/directory/amanda-bynes.htm amanda bynes fake] [http://selinaswigert.friko.pl/pages/discount-wedding.html discount wedding invitation] [http://laniwgi.fhpanel.com/pallet-rack-flow.htm pallet rack flow] [http://fowapvu.fhpanel.com/html/japanese-upskirt.htm japanese upskirt] [http://missmoxr.ayudauni.net/unlocked-cell.html unlocked cell phones] [http://missmoxr.ayudauni.net/dvd-burner.html dvd burner] [http://womamalimi.hostinggratisbrasil.com/male-masturbation.html male masturbation technique] [http://missmoxr.ayudauni.net/sexual-insertions.html sexual insertions] [http://tibuogoz.hostinggratisbrasil.com/html/hog.html hog] [http://zherezx.ayudauni.net/articles/the-phantom-of.html the phantom of the opera] [http://aubreygildersle.freeweb7.com/standing-order.html standing order mandate form] [http://soonweddington.infernohost.net/content/rear-sexual-positions.htm rear sexual positions] [http://themusecalliope.interfree.it/blog/slot-panel.htm slot panel] [http://jeffieseab.fhpanel.com/styles/gay-ebony.html gay ebony] [http://tucabello.infernohost.net/description/chrissy-moran.html chrissy moran] [http://yukohiatt.infernohost.net/flat-tits.html flat tits] [http://theresekulik.totalh.com/nymphets.html nymphets] [http://selinaswigert.friko.pl/pages/satisfying-women.html satisfying women in bed] [http://zzizlita.hostinggratisbrasil.com/brittney.html brittney] [http://kwowukxa.hostinggratisbrasil.com/how-to-deepthroat.html how to deepthroat] [http://doreengilleland.totalh.com/pages/buy-proactive.html buy proactive] [http://soonweddington.infernohost.net/content/bar-mitzvah-photo.htm bar mitzvah photo favors] [http://yukohiatt.infernohost.net/cwshredder.html cwshredder] [http://argentinaperale.infernohost.net/old-time-pottery.html old time pottery] [http://chelsxd.ourprofile.net/wedding-music.html wedding music] [http://helanur.interfree.it/blog/lead-based-products.htm lead based products] [http://helanur.interfree.it/blog/video-downloads.htm video downloads] [http://fowapvu.fhpanel.com/html/ac-back-black.htm ac back black dc in lyric] [http://cacophonysaint.w8w.pl/html/phone-book.htm phone book] [http://cacophonysaint.w8w.pl/html/san-diego-news.htm san diego news note] [http://goraina.interfree.it/low-physics-temperature.html low physics temperature] [http://georgeswanigan.freeweb7.com/small/income-properties.html income properties] [http://daniellegowins.totalh.com/text/sapphic-movies.html sapphic movies] [http://soonweddington.infernohost.net/content/nike-golf.htm nike golf] [http://doreengilleland.totalh.com/pages/california-real.html california real estate exam] [http://lieselottehasse.infernohost.net/ice-cream-maker.html ice cream maker] [http://jeffieseab.fhpanel.com/styles/spring-break-sex.html spring break sex] [http://laniwgi.fhpanel.com/theme-parks.htm theme parks] [http://sujowirlo.fhpanel.com/online-data-storage.html online data storage] [http://cordiademby.w8w.pl/resources/3d-hentai.html 3d hentai] [http://tucabello.infernohost.net/description/jesse-james.html jesse james] [http://zzizlita.hostinggratisbrasil.com/high-voltage.html high voltage] [http://kiwizzo.indo.tc/war-games.htm war games] [http://menkeydarren.ayudauni.net/baby-being-born.html baby being born] [http://zzizlita.hostinggratisbrasil.com/heather-deep-throat.html heather deep throat] [http://corinaperras.totalh.com/riding-bareback.htm riding bareback] [http://romainehibbler.totalh.com/text/altima-partners.html altima partners] [http://themusecalliope.interfree.it/blog/master-craftsman.htm master craftsman] [http://aubreygildersle.freeweb7.com/family-nude-camps.html family nude camps] [http://danielantonio.freeweb7.com/lib/internet-michigan.html internet michigan telephony] [http://zilivrenglaur.ayudauni.net/pubescent-girls.html pubescent girls breasts] [http://moniquemoye.freeweb7.com/data/missing-persons.htm missing persons tsunami] [http://tdtuamo.hostinggratisbrasil.com/resources/catfish.html catfish] [http://lowukibiwo.fhpanel.com/la-jolla-cottage.html la jolla cottage rentals] [http://romainehibbler.totalh.com/text/spokane.html spokane] [http://womamalimi.hostinggratisbrasil.com/metal-building.html metal building suppliers] [http://goraina.interfree.it/jumbo-loans-in.html jumbo loans in california] [http://dungkinslow.infernohost.net/directory/ole-miss.html ole miss] [http://kwowukxa.hostinggratisbrasil.com/horse-sucking.html horse sucking] [http://laniwgi.fhpanel.com/anastacia.htm anastacia] [http://argentinaperale.infernohost.net/sanyo-tv.html sanyo tv] [http://selinaswigert.friko.pl/pages/dbz-gifs.html dbz gifs] [http://tucabello.infernohost.net/description/lea-martini.html lea martini] [http://womamalimi.hostinggratisbrasil.com/router-tables.html router tables] [http://cordiademby.w8w.pl/resources/shaved-bush.html shaved bush] [http://cacophonysaint.w8w.pl/html/princess-leia-hentai.htm princess leia hentai] [http://jacqualineblay.friko.pl/text/lesbians-with.html lesbians with toys] [http://cacophonysaint.w8w.pl/html/mother-masterbating.htm mother masterbating son] [http://fowapvu.fhpanel.com/html/blue-haven-pools.htm blue haven pools] [http://jeffieseab.fhpanel.com/styles/nudist-photographs.html nudist photographs] [http://lowukibiwo.fhpanel.com/anaheim-city.html anaheim city district school] [http://tucabello.infernohost.net/description/time-machine.html time machine] [http://bernadinetrotta.indo.tc/discount-tuxedos.html discount tuxedos] [http://lowukibiwo.fhpanel.com/naked-pamela.html naked pamela anderson] [http://cacophonysaint.w8w.pl/html/spread-my-pussy.htm spread my pussy] [http://daniellegowins.totalh.com/text/kitchen-aide.html kitchen aide] [http://goraina.interfree.it/tracy-california.html tracy california real estate development] [http://romainehibbler.totalh.com/text/uncle-toms-cabin.html uncle toms cabin] [http://yukohiatt.infernohost.net/window-shutters.html window shutters] [http://selinaswigert.friko.pl/pages/all-natural.html all natural girls] [http://cordiademby.w8w.pl/resources/custom-car-decals.html custom car decals] [http://lowukibiwo.fhpanel.com/paula-deen.html paula deen] [http://theresekulik.totalh.com/msn-personal-profile.html msn personal profile] [http://womamalimi.hostinggratisbrasil.com/online-gaming.html online gaming sites multiplayer] [http://chelsxd.ourprofile.net/good-people.html good people] [http://dungkinslow.infernohost.net/directory/babyface.html babyface] [http://armandaabbott.totalh.com/comments/lesbian-family.html lesbian family] [http://elizsteinberg.totalh.com/styles/anniversary-gifts.html anniversary gifts for men] [http://tibuogoz.hostinggratisbrasil.com/html/underage-naked.html underage naked girls]
{{TabsBar|main=Point viewcontrol}}
{{wrongtitle|title=point_viewcontrol}}
{{Preserved entity}}
==Entity Description==
{{CD|CTriggerCamera|file1=triggers.cpp}}{{toc-right}}
A camera entity that controls the player's view. While it's active, the player will see out of the camera.
[[File: point_viewcontrol.png | 64px]]{{this is a|point entity|name=point_viewcontrol}} It is a camera entity that controls the player's view. While it's active, the player will see out of the camera.  


This class appears to have some bugs. Please see its [[talk:point_viewcontrol| discussion]] page for notes.
{{note|In {{css}} {{dods}} {{csgo}}, the camera chooses a random {{code|point_viewcontrol}} entity to look through when the client has not chosen a team yet. If no point_viewcontrol entities are present, observers will spawn at the map [[origin]] instead. This is equivalent to {{goldsrc}} {{ent|info_player_observer|eng=goldsrc}}.}}


==Keyvalues==
== Keyvalues ==
* {{kv targetname}}
{{KV Targetname}}
* {{kv parentname}}
{{KV|Entity to Look At|intn=target|target_destination|Name of the entity that the camera should point at and track while active.}}
* {{kv angles}}
{{KV|Target Attachment Name|intn=targetattachment|string|If set, the camera will focus on the specified attachment on the 'Entity to Look At'.}}
* '''target'''
{{KV|Hold Time|intn=wait|integer|The amount of time the camera should control the player's view for, after which it deactivates itself. If the camera should stay active until told to deactive, set the 'Infinite Hold Time' spawnflag.}}
: <target_destination> Name of the entity that the camera should point at and track while active.
{{KV|Path Corner|intn=moveto|target_destination|The first path corner in a track that the camera should move along once it's activated. If not specified, the camera won't move.}}
* '''targetattachment'''
{{KV|Interpolate Position To Player|intn=interpolatepositiontoplayer|boolean|Gradually interpolate player's position to here on start.|only={{hl2episodes}}}}
: <string> If set, the camera will focus on the specified attachment on the 'Entity to Look At'.
{{KV|Initial Speed|intn=speed|string|The starting speed that the camera moves at, if it's on a path track.}}
* '''wait'''
{{KV|Acceleration units/sec^2|intn=acceleration|string|The speed at which the camera accelerates to path corner's desired speeds.}}
: <integer> The amount of time the camera should control the player's view for, after which it deactivates itself. If the camera should stay active until told to deactive, set the 'Infinite Hold Time' spawnflag.
{{KV|Stop Deceleration units/sec^2|intn=deceleration|string|The speed at which the camera decelerates to path corner's desired speeds.}}
* '''moveto'''
{{KV|FOV|intn=fov|float|The FOV when using this camera.
: <target_destination> The first path corner in a track that the camera should move along once it's activated. If not specified, the camera won't move.
:{{note|Not present in {{as}}'s FGD, but present in all FGDs onward.}}|since={{as}}|also={{GMOD}}|nofgd=1}}
* '''speed'''
{{KV|FOV rate|intn=fov_rate|float|How fast we change to the new FOV.
: <integer> The starting speed that the camera moves at, if it's on a path track.
:{{note|Not present in {{as}}'s FGD, but present in all FGDs onward.}}|since={{as}}|also={{GMOD}}|nofgd=1}}
* '''acceleration'''
{{KV|Tracking Speed of the camera|intn=trackspeed|float|The speed that the camera tries to follow its look target.|since={{portal2}}|also={{GMOD}}}}
: <integer> The speed at which the camera accelerates to path corner's desired speeds.
{{KV Angles}}
* '''deceleration'''
: <integer> The speed at which the camera decelerates to path corner's desired speeds.
==Flags==
* 1 : Start At Player (Start the camera at the player's position. This is kind of buggy, because it breaks the camera movement if the player is still moving when this is activated.)
* 2 : Follow Player.  (This is the same as if you set the lookat target to !player.)
* 4 : Freeze Player  (Stop recognizing input from the player.)
* 8 : Infinite Hold Time  (Ignore the hold time, and stay activated until explicitly disabled.)
* 16 : Snap to goal angles
* 32 : Make Player non-solid
* 64 : Interruptable by Player  (If the player presses +Use, disable.)


==Inputs==
== Flags ==
* {{i targetname}}
{{Fl|1|Start At Player|Start the camera at the player's position. {{bug|Breaks the camera movement if the player was still moving when the camera activated.}}}}
* {{i parentname}}
{{Fl|2|Follow Player|This is the same as if you set the lookat target to !player. {{bug|Causes camera issues in multiplayer.}}}}
* '''Enable'''
{{Fl|4|Freeze Player|Stop recognizing input from the player.}}
: Enable the point_viewcontrol, and start controlling the player's view.
{{Fl|8|Infinite Hold Time|Ignore the hold time, and stay activated until explicitly disabled.}}
* '''Disable'''
{{Fl|16|Snap to goal angles}}
: Disable the point_viewcontrol, and stop controlling the player's view.
{{Fl|32|Make Player non-solid}}
==Outputs==
{{Fl|64|Interruptable by Player|If the player presses +Use, disable.}}
* {{o targetname}}
{{Fl|128|Set FOV|{{note|Not present in {{as}}'s FGD, but present in all FGDs onward.}}|since={{as}}|also={{GMOD}}|nofgd=1}}
* '''OnEndFollow'''
{{Fl|128|All Players|only={{synergy}}|Controls the view of all players. {{note|{{ent|point_viewcontrol_multiplayer}} can be used instead in {{Game link|Left 4 Dead}} and later.}}}}
: Fired when the point_viewcontrol deactivates, due to the Disable input being received, the Entity to Look At being destroyed, or the Hold Time expiring.
 
[[Category:Entities]][[Category:Camera]]
== Inputs ==
{{I|Enable|Enable the <code>point_viewcontrol</code>, and start controlling the player's view.}}
{{I|Disable|Disable the <code>point_viewcontrol</code>, and stop controlling the player's view.}}
{{I|SetTarget|Set a new target for the camera to point at.|param=string|since={{portal2}}|also={{GMOD}}}}
{{I|SetTargetAttachment|Set a new attachment on the target for the camera to point at.|param=string|since={{portal2}}|also={{GMOD}}}}
{{I|ReturnToEyes|Return the camera view to the player's eyes.|since={{portal2}}|also={{GMOD}}}}
{{I|TeleportToView|Teleport the player to the current position of the camera.|since={{portal2}}|also={{GMOD}}}}
{{I|SetTrackSpeed|Set the speed that the camera will try to track it's target.|param=float|since={{portal2}}|also={{GMOD}}}}
{{I|SetPath|Have the camera start following a new path.|param=string|since={{portal2}}|also={{GMOD}}}}
 
== Outputs ==
{{O|OnEndFollow|ac-is-this=1|Fired when the <code>point_viewcontrol</code> deactivates, due to the <code>Disable</code> input being received, the <code>Entity to Look At</code> being destroyed, or the <code>Hold Time</code> expiring.}}
 
== Bugs and caveats ==
This entity has many problems. See the [[talk:point_viewcontrol| discussion]] page for full descriptions and fixes.
{{warning|For {{tf2}}{{l4d2}}, {{Code|select=1|{{ent|point_viewcontrol}}}} makes the player invulnerable while enabled on camera. However, {{Code|select=1|{{ent|point_viewcontrol_survivor}}}} and {{Code|select=1|{{ent|point_viewcontrol_multiplayer}}}} don't.}}
{{bug|The camera doesn't follow its path correctly. It will not follow paths at all if it doesn't have an <code>Entity to Look At</code> set.}}
{{bug|The camera ignores the <code>New Train Speed</code> keyvalue and <code>Teleport to THIS path_corner</code> spawnflag on [[path_track]]s.}}
{{bug|The camera fails to function when parented in Hammer, [[logic_measure_movement]] can be used as a workaround. (Fixed in {{portal2}} and onward.)
{{workaround|Change the parent with the {{code|SetParent}} input}}
}}
{{bug|If the camera is killed while active, or the player suicides, the camera will be stuck permanently on the player's screen. The only fix afterwards is for the player to reconnect to the server. For {{tf2}}, see the [[#VScript fixes|vscript code below]] to fix this issue.}}
{{bug|In {{tf2}}, if the map switches during intermission while a player has a camera enabled, the camera will persist into the next map.}}
 
== VScript fixes ==
For [[VScript]] compatible games on {{tf2branch|2}}, copy the following [[VScript]] code to a .nut file and assign it to every [[point_viewcontrol]] as an Entity Script.
 
This will fix players being invulnerable while using the camera, cameras not being disabled when player is dead/suiciding, cameras persisting across map change in {{tf2}}, and allows multiple players to use the same camera.
{{ExpandBox|<source lang=js>
if (!("SetInputHook" in getroottable()))
{
local _PostInputScope, _PostInputFunc
::SetInputHook <- function(entity, input, pre_func, post_func)
{
entity.ValidateScriptScope()
local scope = entity.GetScriptScope()
if (post_func)
{
local wrapper_func = function()
{
_PostInputScope = scope
_PostInputFunc = post_func
if (pre_func) return pre_func.call(scope)
return true
}
scope["Input" + input]          <- wrapper_func
scope["Input" + input.tolower()] <- wrapper_func
}
else if (pre_func)
{
scope["Input" + input]          <- pre_func
scope["Input" + input.tolower()] <- pre_func
}
}
getroottable().setdelegate(
{
_delslot = function(k)
{
if (_PostInputScope && k == "activator" && "activator" in this)
{
_PostInputFunc.call(_PostInputScope)
_PostInputFunc = null
}
rawdelete(k)
}
})
}
 
if (!("CameraFixerEvents" in getroottable()))
{
::CameraFixerDisableAll <- function()
{
local camera = Entities.FindByClassname(null, "point_viewcontrol")
for (local player; player = Entities.FindByClassname(player, "player");)
camera.AcceptInput("Disable", "", player, player)
}
::CameraFixerEvents <-
{
OnGameEvent_round_start = function(params) { CameraFixerDisableAll() }
OnGameEvent_teamplay_round_start = function(params) { CameraFixerDisableAll() }
OnGameEvent_recalculate_holidays = function(params) { if (GetRoundState() == 8) CameraFixerDisableAll() }
} __CollectGameEventCallbacks(CameraFixerEvents)
}
 
function Precache()
{
local take_damage, life_state
SetInputHook(self, "Enable",
function()
{
take_damage = NetProps.GetPropInt(activator, "m_takedamage")
NetProps.SetPropEntity(self, "m_hPlayer", null)
return true
},
function()
{
NetProps.SetPropInt(activator, "m_takedamage", take_damage)
}
)
SetInputHook(self, "Disable",
function()
{
take_damage = NetProps.GetPropInt(activator, "m_takedamage")
life_state = NetProps.GetPropInt(activator, "m_lifeState")
NetProps.SetPropInt(activator, "m_lifeState", 0)
NetProps.SetPropEntity(self, "m_hPlayer", activator)
return true
},
function()
{
NetProps.SetPropInt(activator, "m_lifeState", life_state)
NetProps.SetPropInt(activator, "m_takedamage", take_damage)
}
)
}
</source>}}
 
[[Category:GUI Entities]]
[[Category:Vehicle Entities]]
[[Category:Camera]]
 
== See Also ==
* {{ent|point_viewcontrol_survivor}}
* {{ent|point_viewcontrol_multiplayer}}

Latest revision as of 17:46, 8 May 2025

edit
Recycle-warning.png
This is a preserved entity in Counter-Strike: SourceHalf-Life 2: DeathmatchDay of Defeat: SourceTeam Fortress 2Left 4 DeadLeft 4 Dead 2Portal 2Counter-Strike: Global Offensive
If the game has round restart mechanics this entity may not behave as expected.
C++ Class hierarchy
CTriggerCamera
CBaseEntity
C++ triggers.cpp

Point viewcontrol.pngpoint_viewcontrol is a point entity available in all Source Source games. It is a camera entity that controls the player's view. While it's active, the player will see out of the camera.

Note.pngNote:In Counter-Strike: Source Day of Defeat: Source Counter-Strike: Global Offensive, the camera chooses a random point_viewcontrol entity to look through when the client has not chosen a team yet. If no point_viewcontrol entities are present, observers will spawn at the map origin instead. This is equivalent to GoldSrc info_player_observer.

Keyvalues

Name (targetname) <string>[ Edit ]
The name that other entities refer to this entity by, via Inputs/Outputs or other keyvalues (e.g. parentname or target).
Also displayed in Hammer's 2D views and Entity Report.
See also:  Generic Keyvalues, Inputs and Outputs available to all entities

Entity to Look At (target) <targetname>
Name of the entity that the camera should point at and track while active.
Target Attachment Name (targetattachment) <string>
If set, the camera will focus on the specified attachment on the 'Entity to Look At'.
Hold Time (wait) <integer>
The amount of time the camera should control the player's view for, after which it deactivates itself. If the camera should stay active until told to deactive, set the 'Infinite Hold Time' spawnflag.
Path Corner (moveto) <targetname>
The first path corner in a track that the camera should move along once it's activated. If not specified, the camera won't move.
Interpolate Position To Player (interpolatepositiontoplayer) <boolean> (only in Half-Life 2: Episode One Half-Life 2: Episode Two)
Gradually interpolate player's position to here on start.
Initial Speed (speed) <string>
The starting speed that the camera moves at, if it's on a path track.
Acceleration units/sec^2 (acceleration) <string>
The speed at which the camera accelerates to path corner's desired speeds.
Stop Deceleration units/sec^2 (deceleration) <string>
The speed at which the camera decelerates to path corner's desired speeds.
FOV (fov) <float> (in all games since Alien Swarm) (also in Garry's Mod) !FGD
The FOV when using this camera.
Note.pngNote:Not present in Alien Swarm's FGD, but present in all FGDs onward.
FOV rate (fov_rate) <float> (in all games since Alien Swarm) (also in Garry's Mod) !FGD
How fast we change to the new FOV.
Note.pngNote:Not present in Alien Swarm's FGD, but present in all FGDs onward.
Tracking Speed of the camera (trackspeed) <float> (in all games since Portal 2) (also in Garry's Mod)
The speed that the camera tries to follow its look target.
Pitch Yaw Roll (Y Z X) (angles) <QAngle>
This entity's orientation in the world. Pitch is rotation around the Y axis, yaw is the rotation around the Z axis, roll is the rotation around the X axis.

Flags

Start At Player : [1]
Start the camera at the player's position.
Icon-Bug.pngBug:Breaks the camera movement if the player was still moving when the camera activated.  [todo tested in ?]
Follow Player : [2]
This is the same as if you set the lookat target to !player.
Icon-Bug.pngBug:Causes camera issues in multiplayer.  [todo tested in ?]
Freeze Player : [4]
Stop recognizing input from the player.
Infinite Hold Time : [8]
Ignore the hold time, and stay activated until explicitly disabled.
Snap to goal angles : [16]
Make Player non-solid : [32]
Interruptable by Player : [64]
If the player presses +Use, disable.
Set FOV : [128] (in all games since Alien Swarm) (also in Garry's Mod) !FGD
Note.pngNote:Not present in Alien Swarm's FGD, but present in all FGDs onward.
All Players : [128] (only in Synergy)
Controls the view of all players.
Note.pngNote:point_viewcontrol_multiplayer can be used instead in Left 4 Dead Left 4 Dead and later.

Inputs

Enable
Enable the point_viewcontrol, and start controlling the player's view.
Disable
Disable the point_viewcontrol, and stop controlling the player's view.
SetTarget <stringRedirectInput/string> (in all games since Portal 2) (also in Garry's Mod)
Set a new target for the camera to point at.
SetTargetAttachment <stringRedirectInput/string> (in all games since Portal 2) (also in Garry's Mod)
Set a new attachment on the target for the camera to point at.
ReturnToEyes  (in all games since Portal 2) (also in Garry's Mod)
Return the camera view to the player's eyes.
TeleportToView  (in all games since Portal 2) (also in Garry's Mod)
Teleport the player to the current position of the camera.
SetTrackSpeed <floatRedirectInput/float> (in all games since Portal 2) (also in Garry's Mod)
Set the speed that the camera will try to track it's target.
SetPath <stringRedirectInput/string> (in all games since Portal 2) (also in Garry's Mod)
Have the camera start following a new path.

Outputs

OnEndFollow
!activator = !caller = this entity
Fired when the point_viewcontrol deactivates, due to the Disable input being received, the Entity to Look At being destroyed, or the Hold Time expiring.

Bugs and caveats

This entity has many problems. See the discussion page for full descriptions and fixes.

Warning.pngWarning:For Team Fortress 2Left 4 Dead 2, point_viewcontrol makes the player invulnerable while enabled on camera. However, point_viewcontrol_survivor and point_viewcontrol_multiplayer don't.
Icon-Bug.pngBug:The camera doesn't follow its path correctly. It will not follow paths at all if it doesn't have an Entity to Look At set.  [todo tested in ?]
Icon-Bug.pngBug:The camera ignores the New Train Speed keyvalue and Teleport to THIS path_corner spawnflag on path_tracks.  [todo tested in ?]
Icon-Bug.pngBug:The camera fails to function when parented in Hammer, logic_measure_movement can be used as a workaround. (Fixed in Portal 2 and onward.)
PlacementTip.pngWorkaround:Change the parent with the SetParent input
  [todo tested in ?]
Icon-Bug.pngBug:If the camera is killed while active, or the player suicides, the camera will be stuck permanently on the player's screen. The only fix afterwards is for the player to reconnect to the server. For Team Fortress 2, see the vscript code below to fix this issue.  [todo tested in ?]
Icon-Bug.pngBug:In Team Fortress 2, if the map switches during intermission while a player has a camera enabled, the camera will persist into the next map.  [todo tested in ?]

VScript fixes

For VScript compatible games on Team Fortress 2 branch Team Fortress 2 branch, copy the following VScript code to a .nut file and assign it to every point_viewcontrol as an Entity Script.

This will fix players being invulnerable while using the camera, cameras not being disabled when player is dead/suiciding, cameras persisting across map change in Team Fortress 2, and allows multiple players to use the same camera.


if (!("SetInputHook" in getroottable()))
{
	local _PostInputScope, _PostInputFunc
	::SetInputHook <- function(entity, input, pre_func, post_func)
	{
		entity.ValidateScriptScope()
		local scope = entity.GetScriptScope()
		if (post_func)
		{
			local wrapper_func = function() 
			{ 
				_PostInputScope = scope
				_PostInputFunc = post_func
				if (pre_func) return pre_func.call(scope)
				return true
			}	
			scope["Input" + input]           <- wrapper_func
			scope["Input" + input.tolower()] <- wrapper_func
		}
		else if (pre_func)
		{
			scope["Input" + input]           <- pre_func
			scope["Input" + input.tolower()] <- pre_func
		}
	}
	getroottable().setdelegate(
	{
		_delslot = function(k)
		{
			if (_PostInputScope && k == "activator" && "activator" in this)
			{
				_PostInputFunc.call(_PostInputScope)
				_PostInputFunc = null
			}		
			rawdelete(k)
		}
	})
}

if (!("CameraFixerEvents" in getroottable()))
{
	::CameraFixerDisableAll <- function()
	{
		local camera = Entities.FindByClassname(null, "point_viewcontrol")
		for (local player; player = Entities.FindByClassname(player, "player");)
			camera.AcceptInput("Disable", "", player, player)
	}
	::CameraFixerEvents <- 
	{
		OnGameEvent_round_start = function(params) { CameraFixerDisableAll() }
		OnGameEvent_teamplay_round_start = function(params) { CameraFixerDisableAll() }
		OnGameEvent_recalculate_holidays = function(params) { if (GetRoundState() == 8) CameraFixerDisableAll() }
	} __CollectGameEventCallbacks(CameraFixerEvents)
}

function Precache()
{
	local take_damage, life_state
	SetInputHook(self, "Enable", 
		function()
		{
			take_damage = NetProps.GetPropInt(activator, "m_takedamage")
			NetProps.SetPropEntity(self, "m_hPlayer", null)
			return true
		},
		function()
		{
			NetProps.SetPropInt(activator, "m_takedamage", take_damage)	
		}
	)
	SetInputHook(self, "Disable", 
		function()
		{
			take_damage = NetProps.GetPropInt(activator, "m_takedamage")
			life_state = NetProps.GetPropInt(activator, "m_lifeState")
			NetProps.SetPropInt(activator, "m_lifeState", 0) 
			NetProps.SetPropEntity(self, "m_hPlayer", activator)
			return true
		}, 
		function()
		{
			NetProps.SetPropInt(activator, "m_lifeState", life_state) 	
			NetProps.SetPropInt(activator, "m_takedamage", take_damage) 	
		}
	)
}

See Also