Table of Contents
This modification gives the possibility of adding cameras, e.g. a discharge pipe camera or a rear view camera. You can easily switch between added cameras which are displayed as HUD.
As standard, some of the originally available vehicles were equipped with camera configurations.
Change camera system mode (off/always on/only when reversing) - "z" key (default)
Next/previous camera - "left shift + k/m" keys (default)
ATTENTION!
- to activate the camera system, the vehicle must have their configuration added,
- the image quality of the cameras is the highest I could set, so please bear with me. (The quality of the camera also depends on your graphics settings, it is also possible to manually improve it, details are below)
If you want to install latest official version, you can download it like other mods.
- Clone the repo
git clone https://github.com/4c65736975/cameraSystem
- Open cloned folder.
- Run modInstaller.exe.
- That"s it, if everything went as it should, you can delete cloned folder.
- Run the game and have a nice time.
or
- Click code, download zip.
- Extract downloaded file.
- Run modInstaller.exe.
- That"s it, if everything went as it should, you can delete downloaded folder and zip file.
- Run the game and have a nice time.
You can improve camera quality (dust, effects) by changing the code as shown below. Note that with this change you will get a lua error from time to time, but the game will run fine.
src/gui/hud/elements/CameraRenderElement.lua
local development = false -- change to true
You can just copy code below and fill it with appropriate data type. (Here you will find a list of vehicles integrated by default)
<cameraSystem>
<cameraConfigurations>
<cameraConfiguration name="string" price="integer">
<camera node="node" name="string" fov="float" rotation="x y z" translation="x y z"/>
</cameraConfiguration>
</cameraConfigurations>
</cameraSystem>
<!--
cameraConfiguration -> name -> translation key for configuration name e.g. $l10n_configuration_valueOne
cameraConfiguration -> price -> price of configuration e.g. "500"
camera -> node -> node where camera will be linked, node index e.g. "0>1" or i3dMapping e.g. "vehicle_vis" - REQUIRED
camera -> name -> translation key for camera name e.g $l10n_camera_front_left_wheel - default camera name when not defined is "Untitled"
camera -> fov -> camera field of view - default is "60"
camera -> rotation -> camera rotation based on camera node e.g. "0 90 0"
camera -> translation -> camera translation based on camera node e.g. "0 5 0"
Default available camera names is: (name - translation key)
"Rear" -> $l10n_cameraSystem_rear_camera_name
"Pipe" -> $l10n_cameraSystem_pipe_camera_name
"Work area" -> $l10n_cameraSystem_work_camera_name
-->
You can also add an objectChange (you decide whether the defined object should be hidden in this configuration or shown, it can also be visible all the time)
<cameraConfiguration name="$l10n_configuration_valueYes" price="100">
<camera node="0>1"/>
<objectChange node="node" visibilityActive="boolean" visibilityInactive="boolean"/>
</cameraConfiguration>
<!--
objectChange -> node -> object node which visibility will be affect, node index e.g. "0>4>5" or i3dMapping e.g. "camera_node_top"
objectChange -> visibilityActive -> whether or not object from object node is visible in this configuration
objectChange -> visibilityInactive -> whether or not object from object node is visible all time
-->
You can add as many configurations and cameras as the game allows you.
<cameraSystem>
<cameraConfigurations>
<cameraConfiguration name="$l10n_configuration_valueNo" price="0"/>
<cameraConfiguration name="$l10n_configuration_valueOne" price="200">
<camera node="magnum7240pro_main_component1"/>
</cameraConfiguration>
<cameraConfiguration name="$l10n_configuration_valueAll" price="500">
<camera node="magnum7240pro_main_component1" fov="75" translation="0 3.2 0" rotation="-25 180 0"/>
<camera node="0>1" name="$l10n_cameraSystem_rear_camera_name" rotation="0 180 0"/>
<objectChange node="0>0|17" visibilityActive="true" visibilityInactive="false"/>
</cameraConfiguration>
</cameraConfigurations>
</cameraSystem>
Distributed under the GPL-3.0 license. See LICENSE for more information.