-
Notifications
You must be signed in to change notification settings - Fork 14
Autocameras
Matt Haynie edited this page Mar 2, 2018
·
15 revisions
Provides many advanced automatic camera switching features. Currently only supports declaring named autocameras in a configuration file located in /tf/addons/castingessentials/autocameras/<mapname>.vdf.
An example of a configuration file for cp_gullywash_final1:
AutoCameras
{
Camera { name blu_second_choke pos "576 -1928 405" ang "5 55" }
Camera { name blu_last_pipe pos "3411 -1054 465" ang "0 15" }
Camera { name blu_last_spawn pos "4675 -1049 506" ang "30 0" }
map_origin "675 -300 0" // Optional, defaults to "0 0 0"
Camera { name blu_lobby pos "2483 -1597 365" ang "0 55" fov 55 }
Camera { name red_lobby mirror blu_lobby }
CameraGroups
{
last
{
blu_last_pipe ""
blu_last_spawn ""
}
blu
{
blu_lobby ""
blu_last_pipe ""
blu_last_spawn ""
blu_second_choke ""
}
}
}
Camera
{
name <camera_name>
pos <camera_position>
ang <camera_angle>
fov <camera_fov>
}
or
Camera
{
mirror <camera_name>
}
If mirror is defined, all other values in the camera definition are ignored.
fov is optional. If not specified, the fov will be set to either ce_fovoverride_fixed or ce_fovoverride_roaming depending on the mode of the switch to the autocamera.
map_origin is only required if mirrored cameras are in use. Some maps do not have their origin at 0 0 0, so the offset must be defined manually.
CameraGroups
{
<camera_group_name>
{
<camera_name> <any_value>
<camera_name> <any_value>
etc...
}
}
Camera groups are an optional feature used by ce_autocamera_cycle and ce_autocamera_spec_player.
-
ce_autocamera_show_cameras: Draws a debug overlay showing all autocameras on the map. If value is >= 2, draws autocamera frustums as well. -
ce_autocamera_spec_player_fallback: ce_autocamera_spec_player_fovce_autocamera_spec_player_distce_autocamera_spec_player_los-
ce_autocamera_goto_mode: The spec_mode to use for
-
ce_autocamera_create: Usage:ce_autocamera_create <name>. Outputs an autocamera definition to console that can be copy and pasted into an autocamera definitions file. -
ce_autocamera_goto: Usage:ce_autocamera_goto <name>. Teleports the camera to the specified autocamera. -
ce_autocamera_cycle: Usage:ce_autocamera_cycle <next/prev>. Cycles forwards or backwards logically through the available autocameras. The behavior is as follows:- If already spectating from the position of an autocamera, progress forwards/backwards through the autocameras based on file order.
- If our current position doesn't match any autocamera definintions, try to find the nearest/furthest autocamera that has line of sight (LOS) to our current position.
- If no autocameras have LOS to our current position, find the nearest/furthest autocamera with our current position in its view frustum.
- If our position is not in any autocamera's view frustum, find the nearest/furthest autocamera to our current position.
-
ce_autocamera_reload_config: Reloads the autocamera definitions file (located in /tf/addons/castingessentials/autocameras/<mapname>.vdf)