Skip to content

Proky0/cinematic-view

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cinematic Camera Script

A cinematic camera script for FiveM that allows you to create dynamic and immersive views with depth of field effects and smooth movements.

✨ Features

  • Automatic modes: Automatic detection whether the player is on foot or in a vehicle
  • Multiple angles: 30 presets for pedestrian mode, 13 for vehicles
  • Dynamic movements: 3 types of camera movements (vertical, horizontal, circular)
  • Depth of field: Realistic DOF effect with automatic focus
  • Automatic switching: Automatic rotation between cameras every 15 seconds
  • Manual navigation: Full control with directional arrows
  • Smooth transitions: Smooth animations between different views

🎮 Controls

Key Action
F10 Enable/Disable cinematic mode
(Right arrow) Next camera
(Left arrow) Previous camera

⚙️ Configuration

The shared.lua file contains all customizable parameters:

Camera Presets

Each preset contains the following parameters:

  • distance: Camera distance from the player/vehicle (in meters)
  • height: Camera height relative to the player/vehicle (in meters)
  • angle: Rotation angle around the player/vehicle (in degrees, 0° = front)
  • travelling: Type of camera movement
    • "vertical": Up and down movement
    • "horizontal": Left to right movement
    • "circular": Circular movement around the subject
    • "none": No movement
  • fov: Field of View (40-70 recommended)
  • dof: Depth of field intensity (1.0-10.0, higher = more blur)

Global Parameters

-- Transition speed between cameras (in milliseconds)
Shared.TRANSITION_SPEED = 2500

-- Travelling movement speed
Shared.TRAVELLING_SPEED = 0.0006

-- Movement amplitude by mode
Shared.TRAVELLING_AMPLITUDE = {
    PLAYER = {
        vertical = 1.0,    -- Vertical movement amplitude on foot
        horizontal = 1.2,  -- Horizontal movement amplitude on foot
        circular = 2.2     -- Circular movement radius on foot
    },
    VEHICLE = {
        vertical = 1.5,    -- Vertical movement amplitude in vehicle
        horizontal = 2.0,  -- Horizontal movement amplitude in vehicle
        circular = 3.5     -- Circular movement radius in vehicle
    }
}

-- Delay before automatic camera change (in milliseconds)
Shared.AUTO_SWITCH_DELAY = 15000 -- 15 seconds

Adjustments by Vehicle Type

The script automatically adapts the travelling speed according to vehicle type:

  • Motorcycles (class 8) and Bicycles (class 13): Reduced speed (0.0008)
  • Helicopters (class 15) and Planes (class 16): Very reduced speed (0.0004)
  • Other vehicles: Standard speed (0.0006)

📦 Installation

  1. Download the script
  2. Place the folder in your resources directory
  3. Add ensure cinematic_view to your server.cfg
  4. Customize the parameters in shared.lua if desired
  5. Restart your server

🎨 Customization

Create your own presets

Simply add a new object in Shared.PRESETS.PLAYER or Shared.PRESETS.VEHICLE:

{ 
    distance = 3.0,           -- 3 meters distance
    height = 0.5,             -- 0.5 meter height
    angle = 45,               -- 45° to the right
    travelling = "circular",  -- Circular movement
    fov = 55.0,              -- Field of view
    dof = 3.5                -- Depth of field
}

🔧 Compatibility

  • FiveM
  • Tested and functional on recent versions
  • Compatible with most frameworks (ESX, QBCore, etc.)

🤝 Contribution

Contributions are welcome! Feel free to:

  • Report bugs
  • Suggest new features
  • Submit pull requests
  • Share your custom presets

💡 Credits

Developed by Proky


⭐ If you like this script, feel free to star it on GitHub!

About

A cinematic camera script for FiveM that allows you to create dynamic and immersive views with depth of field effects and smooth movements.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages