Camera (function list)
Status: Implemented (API 1.24). Generated from
client/clight/idl/clight_api.jsonbytools/docs/gen_api_reference.py; do not edit by hand. 6 functions, the newest from API 1.13.
Explanations and examples: Players, Guide: Player control. Every function of the camera module is listed here in table order.
The details of each function follow the table, in the same order. Side: where the function works (server, client, both). Context: the thread it may be called on (Conventions). Since: the API version that added it.
| C function | Lua | Side | Context | Since |
|---|---|---|---|---|
cl_camera_get |
cl.camera.get |
client | ANY | 1.11 |
cl_camera_position |
cl.camera.position |
client | ANY | 1.11 |
cl_camera_is_first_person |
cl.camera.is_first_person |
client | ANY | 1.11 |
cl_camera_set_effects |
cl.camera.set_effects |
client | ANY | 1.13 |
cl_camera_clear_effects |
cl.camera.clear_effects |
client | ANY | 1.13 |
cl_camera_get_effects |
cl.camera.get_effects |
client | ANY | 1.13 |
cl_camera_get
cl_result cl_camera_get(cl_camera_info* out);
- Side: client. Context: ANY (any thread). Since: API 1.11.
- Lua:
cl.camera.get - C++:
clight::camera::get()→Expected<cl_camera_info> - The last parameter receives the result. Lua returns it; C++ returns it in
Expected<T>. - Returns
CL_OKor an error code (Error codes). Lua raises acl.Erroron failure.
cl_camera_position
cl_result cl_camera_position(cl_vec3* out);
- Side: client. Context: ANY (any thread). Since: API 1.11.
- Lua:
cl.camera.position - C++:
clight::camera::position()→Expected<cl_vec3> - The last parameter receives the result. Lua returns it; C++ returns it in
Expected<T>. - Returns
CL_OKor an error code (Error codes). Lua raises acl.Erroron failure.
cl_camera_is_first_person
bool cl_camera_is_first_person(void);
- Side: client. Context: ANY (any thread). Since: API 1.11.
- Lua:
cl.camera.is_first_person - C++:
clight::camera::is_first_person()→bool
cl_camera_set_effects
cl_result cl_camera_set_effects(const cl_camera_effects* fx);
- Side: client. Context: ANY (any thread). Since: API 1.13.
- Lua:
cl.camera.set_effects - C++:
clight::camera::set_effects(const cl_camera_effects* fx)→Expected<void> - Returns
CL_OKor an error code (Error codes). Lua raises acl.Erroron failure.
cl_camera_clear_effects
cl_result cl_camera_clear_effects(void);
- Side: client. Context: ANY (any thread). Since: API 1.13.
- Lua:
cl.camera.clear_effects - C++:
clight::camera::clear_effects()→Expected<void> - Returns
CL_OKor an error code (Error codes). Lua raises acl.Erroron failure.
cl_camera_get_effects
cl_result cl_camera_get_effects(cl_camera_effects* out);
What applies this frame (every mod combined, after the player’s settings).
- Side: client. Context: ANY (any thread). Since: API 1.13.
- Lua:
cl.camera.get_effects - C++:
clight::camera::get_effects()→Expected<cl_camera_effects> - The last parameter receives the result. Lua returns it; C++ returns it in
Expected<T>. - Returns
CL_OKor an error code (Error codes). Lua raises acl.Erroron failure.