Point viewcontrol: Difference between revisions
Jump to navigation
Jump to search
Note:This entity has many problems. See the discussion page for full descriptions and fixes.
Bug:The camera doesn't follow its path correctly. It will not follow paths at all if it doesn't have an
Bug:The camera ignores the
Bug:The camera fails to function when parented, logic_measure_movement can be used as a workaround. [todo tested in ?]
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. [todo tested in ?]
(Mentioned point_viewcontrol_multiplayer in Synergy's "All Players" spawnflag) |
Deprecated (talk | contribs) (Added internal names for keyvalues, updated for Garry's Mod) |
||
Line 13: | Line 13: | ||
== Keyvalues == | == Keyvalues == | ||
{{KV|Entity to Look At|target_destination|Name of the entity that the camera should point at and track while active.}} | {{KV|Entity to Look At|intn=target|target_destination|Name of the entity that the camera should point at and track while active.}} | ||
{{KV|Target Attachment Name|string|If set, the camera will focus on the specified attachment on the 'Entity to Look At'.}} | {{KV|Target Attachment Name|intn=targetattachment|string|If set, the camera will focus on the specified attachment on the 'Entity to Look At'.}} | ||
{{KV|Hold Time|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|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.}} | ||
{{KV|Path Corner|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.}} | {{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.}} | ||
{{KV|Interpolate Position To Player|boolean|Gradually interpolate player's position to here on start.|only={{hl2episodes}}}} | {{KV|Interpolate Position To Player|intn=interpolatepositiontoplayer|boolean|Gradually interpolate player's position to here on start.|only={{hl2episodes}}}} | ||
{{KV|Initial Speed|string|The starting speed that the camera moves at, if it's on a path track.}} | {{KV|Initial Speed|intn=speed|string|The starting speed that the camera moves at, if it's on a path track.}} | ||
{{KV|Acceleration units/sec^2|string|The speed at which the camera accelerates to path corner's desired speeds.}} | {{KV|Acceleration units/sec^2|intn=acceleration|string|The speed at which the camera accelerates to path corner's desired speeds.}} | ||
{{KV|Stop Deceleration units/sec^2|string|The speed at which the camera decelerates to path corner's desired speeds.}} | {{KV|Stop Deceleration units/sec^2|intn=deceleration|string|The speed at which the camera decelerates to path corner's desired speeds.}} | ||
{{KV| | {{KV|FOV|intn=fov|float|The FOV when using this camera. | ||
{{KV|FOV|float| | :{{note|Not present in {{as}}'s FGD, but present in all FGDs onward.}}|since={{as}}|also={{GMOD}}|nofgd=1}} | ||
{{KV| | {{KV|FOV rate|intn=fov_rate|float|How fast we change to the new FOV. | ||
:{{note|Not present in {{as}}'s FGD, but present in all FGDs onward.}}|since={{as}}|also={{GMOD}}|nofgd=1}} | |||
{{KV|Tracking Speed of the camera|intn=trackspeed|float|The speed that the camera tries to follow its look target.|since={{portal2}}|also={{GMOD}}}} | |||
{{KV Targetname}} | {{KV Targetname}} | ||
{{KV Angles}} | {{KV Angles}} | ||
Line 35: | Line 37: | ||
{{Fl|32|Make Player non-solid}} | {{Fl|32|Make Player non-solid}} | ||
{{Fl|64|Interruptable by Player|If the player presses +Use, disable.}} | {{Fl|64|Interruptable by Player|If the player presses +Use, disable.}} | ||
{{Fl|128|Set FOV|since={{as}}|nofgd=1}} | {{Fl|128|Set FOV|{{note|Not present in {{as}}'s FGD, but present in all FGDs onward.}}|since={{as}}|also={{GMOD}}|nofgd=1}} | ||
{{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.}}}} | {{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.}}}} | ||
== Inputs == | == Inputs == | ||
{{IO|Enable|Enable the point_viewcontrol, and start controlling the player's view.}} | {{IO|Enable|Enable the <code>point_viewcontrol</code>, and start controlling the player's view.}} | ||
{{IO|Disable|Disable the point_viewcontrol, and stop controlling the player's view.}} | {{IO|Disable|Disable the <code>point_viewcontrol</code>, and stop controlling the player's view.}} | ||
{{IO|SetTarget|Set a new target for the camera to point at.|param=string|since={{portal2}}}} | {{IO|SetTarget|Set a new target for the camera to point at.|param=string|since={{portal2}}|also={{GMOD}}}} | ||
{{IO|SetTargetAttachment|Set a new attachment on the target for the camera to point at.|param=string|since={{portal2}}}} | {{IO|SetTargetAttachment|Set a new attachment on the target for the camera to point at.|param=string|since={{portal2}}|also={{GMOD}}}} | ||
{{IO|ReturnToEyes|Return the camera view to the player's eyes.|since={{portal2}}}} | {{IO|ReturnToEyes|Return the camera view to the player's eyes.|since={{portal2}}|also={{GMOD}}}} | ||
{{IO|TeleportToView|Teleport the player to the current position of the camera.|since={{portal2}}}} | {{IO|TeleportToView|Teleport the player to the current position of the camera.|since={{portal2}}|also={{GMOD}}}} | ||
{{IO|SetTrackSpeed|Set the speed that the camera will try to track it's target.|param=float|since={{portal2}}}} | {{IO|SetTrackSpeed|Set the speed that the camera will try to track it's target.|param=float|since={{portal2}}|also={{GMOD}}}} | ||
{{IO|SetPath|Have the camera start following a new path.|param=string|since={{portal2}}}} | {{IO|SetPath|Have the camera start following a new path.|param=string|since={{portal2}}|also={{GMOD}}}} | ||
{{I Targetname}} | {{I Targetname}} | ||
== Outputs == | == Outputs == | ||
{{IO|OnEndFollow|Fired when the point_viewcontrol 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.}} | {{IO|OnEndFollow|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.}} | ||
{{O Targetname}} | {{O Targetname}} | ||
Revision as of 15:12, 14 October 2020
Template:Base point It is a camera entity that controls the player's view. While it's active, the player will see out of the camera.


Entity to Look At
set. [todo tested in ?]
New Train Speed
keyvalue and Teleport to THIS path_corner
spawnflag on path_tracks. [todo tested in ?]

Keyvalues
- 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
)
- 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 rate (fov_rate) <float> (in all games since
) (also in
) !FGD
- How fast we change to the new FOV.
- Tracking Speed of the camera (trackspeed) <float> (in all games since
) (also in
)
- The speed that the camera tries to follow its look target.
- Name (targetname) <string>[ Edit ]
- The name that other entities refer to this entity by, via Inputs/Outputs or other keyvalues (e.g.
parentname
ortarget
).
Also displayed in Hammer's 2D views and Entity Report.See also: Generic Keyvalues, Inputs and Outputs available to all entities
- 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.
Bug: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.
Bug: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.
- All Players : [128] (only in
)
- Controls the view of all players.
Note:point_viewcontrol_multiplayer can be used instead in
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.
- SetTargetAttachment <string > (in all games since
) (also in
)
- Set a new attachment on the target for the camera to point at.
- ReturnToEyes (in all games since
) (also in
)
- Return the camera view to the player's eyes.
- TeleportToView (in all games since
) (also in
)
- Teleport the player to the current position of the camera.
- SetTrackSpeed <float > (in all games since
) (also in
)
- Set the speed that the camera will try to track it's target.
Outputs
- OnEndFollow
- Fired when the
point_viewcontrol
deactivates, due to theDisable
input being received, theEntity to Look At
being destroyed, or theHold Time
expiring.