Pack Making JSON Cameras - DonBruce64/MinecraftTransportSimulator GitHub Wiki

Camera objects allow you to define new camera points on entities. These points, unlike the normal user camera, are locked to the position and rotation you specify, so they can be used for special areas, such as airplane landing gear, bus doors, and gun barrel edges. To facilitate the last of these, camera objects may be rotated and translated via animations. Each Camera Object is defined as follows:

  • pos – An entry of x, y, and z coordinates that define the center point of where this camera will be located on the entity. Note that FOV means this value may not be 100% accurate, so you may need to fudge this value to make things work.
  • rot – This parameter is optional. If included, it defines the x, y, and z rotations for this camera.
  • overlay – This parameter is optional. If included, MTS will render the specified texture as an overlay when this camera is active. This overlay will also disable the hotbar and cross-hair rendering.
  • fovOverride – This parameter is optional. If included, MTS will set the player's FOV to this value when they are in this camera mode. Useful for simulating zoom functions on scopes and sights.
  • mouseSensitivityOverride – This parameter is optional. If included, MTS will set the player's mouse sensitivity to this value when they are in this camera mode. Useful if you have a zoomed view and want to make aiming easier.
  • nightVision - If true, the player will have night vision with this overlay.
  • isInterior - If true, the camera will be considered to be interior. Used in conjunction with sounds.
  • animations – A listing of animations. These work as expected, however, using the visibility animation will skip rendering the camera if the camera isn't "visible". This can be used to dynamically enable cameras, such as those for active guns or vehicle components. Note that the camera index will not increment during this, so if you stop rendering camera #1, then MTS will switch to camera #2 instead. This can be helpful if you want cameras to replace each other for specific actions.