# Freecam Pro

**BUY NOW:** [**https://rpworksmods.com/**](https://rpworksmods.com/)<br>

**📦 Features**

* 🎥 Multiple Camera Modes (Freecam, Orbit Mode, Follow Mode)
* 🎞️ Rockstar-Editor inspired keyframe system
* ⏺️ Live camera position recorder & auto-keyframe system
* 💡 Placeable ambient lights & spotlights, all fully configurable
* 💾 Save your keyframe setups for future use to finish your project in your own time.
* 📺 Multiple pre-built screen filters, and configuration to include even more!
* 🛠️ Dynamic and toggleable depth of field system.
* 📍 Easy to use and intuitive controls.
* 📍 ESX & QBCore compatible.
* 🔐 ESX & QBCore permission systems.
* 🔐 ACE permission system.
* 🥎 Easy to install.
* 🧑‍💼 Fully supported.

***

### 🧱 Installation

Follow instructions in [Getting Started](/rp-works-modding-docs/readme.md)

#### QBCore Permissions Example

```lua
Config.Framework = 'QBCore' -- Must be set if you are using a QBCore permission system
Config.Permissions.Enabled = true -- Must be enabled if you wish to lock the command

Config.QBCore = {
    ResourceName = 'qb-core', -- Set this to your QBCore resource's folder name
    UsePermissions = true, -- Set to true if you wish to restrict access based on permission
    Permissions = { 'admin', 'god' }, -- Include names of the permission groups you want to allow

    UseJobLock = true, -- Set to true if you wish to restrict access based on job
    Jobs = {
        police = 0, -- Job = Grade
        ambulance = 2 -- e.g. ambulance = 2
    }
}
```

{% hint style="info" %}
With this setup, QBCore admins/gods can use it, and the listed jobs can use it if they meet the minimum grade.
{% endhint %}

#### ESX Permissions Example

```lua
Config.Framework = 'ESX' -- Must be set if you are using an ESX permission system
Config.Permissions.Enabled = true -- Must be enabled if you wish to lock the command

Config.ESX = {
    ResourceName = 'es_extended', -- Set this to your ESX resource's folder name.
    UseGroups = true, -- Set to true if you wish to allow access based on user groups.
    Groups = {
        admin = true, -- Group = allowed
        superadmin = true -- e.g. admin = true
    },

    UseJobLock = true, -- Set to true if you wish to allow access based on job
    Jobs = {
        police = 0, -- Job = Grade
        ambulance = 2 -- e.g. ambulance = 2
    }
}
```

{% hint style="info" %}
With this setup, ESX admins/superadmins can use it, and the listed jobs can use it if they meet the minimum grade.
{% endhint %}

#### ACE Permissions

If you're on a standalone server or a server that prefers the use of ACE permissions, use this section.

```lua
Config.Framework = 'STANDALONE' -- Must be set if using ACE permissions (or no perms at all)
Config.Permissions.Enabled = true -- Must be set if you wish to use permissions
Config.Permissions.UseAce = true -- Must be set if you wish to use ace perms
Config.Permissions.Ace = 'rpw.freecam' -- Don't recommend to change this unless you know what you're doing
```

Example `server.cfg`:

```cfg
add_ace group.admin rpw.freecam allow
add_principal identifier.license:YOUR_LICENSE_HERE group.admin
```

The ace permission name can be altered in the config file. If this is done, ensure you replace rpw\.freecam with the new name you decide.

{% hint style="info" %}
The above are examples only. To learn more about configuring ACE perms, check out this guide: <https://docs.badger.store/fivem-general-help/ace-permissions>
{% endhint %}

***

### ⚙️ Configuration

All configuration is handled inside config.lua:

***

```lua
Config = {} -- DO NOT REMOVE THIS LINE


---------------------------------------
------------- LOCALISATION ------------
---------------------------------------
Config.Locale = 'en' -- Locale file from locales/*.lua to use for client, server and NUI text.

---------------------------------------
------- FRAMEWORK / PERMISSIONS --------
---------------------------------------
-- Framework options: 'STANDALONE', 'QBCore', 'ESX'
-- STANDALONE works without any framework. QBCore/ESX add optional job/group locking.
Config.Framework = 'STANDALONE'

Config.Permissions = {
    Enabled = false, -- If false, everyone can use /freecam and the menu.
    RestrictFreecam = true, -- If true, checks access before enabling freecam.
    RestrictMenu = true, -- If true, checks access before opening the menu.

    -- ACE permission support. Add examples to server.cfg:
    -- add_ace group.admin rpw.freecam allow
    -- add_principal identifier.license:xxxxxxxx group.admin
    UseAce = true,
    Ace = 'rpw.freecam',

    -- If enabled and no selected framework rule matches, ACE can still allow access.
    AllowAceFallback = true
}

Config.Standalone = {
    -- STANDALONE relies on ACE permissions when Config.Permissions.Enabled is true.
    -- Leave Config.Permissions.Enabled = false if the command should be public.
}

Config.QBCore = {
    ResourceName = 'qb-core',

    -- Optional QBCore permission groups, checked with QBCore.Functions.HasPermission.
    UsePermissions = true,
    Permissions = { 'admin', 'god' },

    -- Optional QBCore job lock. Values can be true or a minimum grade number.
    UseJobLock = false,
    Jobs = {
        -- police = 0,
        -- ambulance = 2
    }
}

Config.ESX = {
    ResourceName = 'es_extended',

    -- Optional ESX admin group lock, checked with xPlayer.getGroup().
    UseGroups = true,
    Groups = {
        admin = true,
        superadmin = true
    },

    -- Optional ESX job lock. Values can be true or a minimum grade number.
    UseJobLock = false,
    Jobs = {
        -- police = 0,
        -- ambulance = 2
    }
}

---------------------------------------
----------- Commands/Keybinds ---------
---------------------------------------
Config.ActivationCommand = 'freecam' -- Set this to the command you wish players to use to toggle this mode. E.g. /freecam = 'freecam'
Config.MenuKey = 167 -- F6 - Key to open the menu (Players can change this in settings)
Config.ToggleOverlayKey = 289 -- F2 - Key to toggle the keybind overlay (Players can change this in settings)

--------------------------------------
------------ CAMERA SETTINGS ---------
--------------------------------------
Config.DefaultFov = 75.0
Config.MinFov = 20.0
Config.MaxFov = 120.0
Config.FovStep = 1.0
Config.CameraRange = 350.0 -- maximum distance from activation point before movement is clamped
Config.MoveSpeed = 0.35
Config.FastMultiplier = 3.0
Config.SlowMultiplier = 0.35
Config.LookSensitivity = 7.5
Config.RollSpeed = 1.2
Config.PitchStepWithShiftScroll = 2.0
Config.HideHudAndRadar = true
Config.FreezePlayer = true
Config.KeepPlayerCollision = true
Config.ShowOverlayByDefault = true

--------------------------------------
----------- TARGETING/SEARCH ---------
--------------------------------------
Config.TargetSearchRadius = 120.0 -- For follow and orbit mode target searching
Config.RaycastDistance = 300.0 -- When using 'Select in view', how far should it send a ray ahead from where the camera is looking?
Config.MaxListedPlayers = 64 -- Maximum amount of players listed in the menu as targets (Sorted by distance)
Config.MaxListedVehicles = 80 -- Maximum amount of vehicles listed in the menu as targets (Sorted by distance)
Config.MaxListedPeds = 80 -- Maximum amount of peds listed in the menu as targets (Sorted by distance)


--------------------------------------
----------- DEFAULT SETTINGS ---------
------- Can be changed in-game -------
--------------------------------------

-- Follow/orbit defaults 
Config.Follow = {
    Offset = { x = 0.0, y = -6.0, z = 2.0 },
    MatchTargetRotation = false,
    OffsetMoveSpeed = 0.25
}

Config.Orbit = {
    Radius = 8.0,
    Height = 2.0,
    Pitch = 14.0, -- vertical orbit angle in degrees; positive looks from above, negative from below
    LookAtHeight = 0.8, -- target focus height above entity coords
    Speed = 25.0,
    MinRadius = 1.0,
    MaxRadius = 80.0,
    MinPitch = -80.0,
    MaxPitch = 80.0,
    PitchStep = 35.0 -- degrees per second when using SPACE / LCTRL in orbit mode
}

-- Keyframes/path recording
Config.Keyframes = {
    DefaultDuration = 2500,
    DefaultEasing = 'easeInOut', -- linear, easeIn, easeOut, easeInOut
    LoopPlayback = false
}

Config.Recorder = {
    SampleInterval = 100, -- ms
    DefaultReplaySpeed = 1.0,
    UseCatmullRom = true
}

Config.DepthOfField = {
    Enabled = false,
    FocusDistance = 10.0, -- metres from the camera to keep sharp
    FocusWidth = 8.0, -- depth band around the focus distance that remains readable
    Strength = 0.45
}

-- Default light values used by the NUI when spawning lights.
--
-- PERFORMANCE WARNING:
-- GTA/FiveM light natives are frame-rendered rather than persistent entities, so the
-- resource redraws every configured light every tick while freecam is active.
Config.Lights = {
    DefaultRange = 90.0,
    DefaultStrength = 12.0,
    DefaultSpotRoundness = 0.5,
    DefaultSpotRadius = 35.0,
    DefaultSpotFadeout = 80.0,
    DefaultUseShadow = true,
    SpawnForwardOffset = 0.75,
    UsePointFill = true,
    AmbientSpotRadius = 90.0,
    AmbientFanStrengthMultiplier = 0.45,
    ShowLightMarkers = true,
    ShowSpotlightAimLine = false,
    MarkerSize = 0.18,
    MarkerAlpha = 190,
    MaxLights = 64
}

------------------------------------
-------- Keyframes/Recording -------
------------------------------------

-- Saved path storage, server-side in this resource folder
Config.Storage = {
    PathFile = 'data/paths.json', -- A url to the file where the saved paths will be stored. Don't recommend changing this one.
    MaxSavedPaths = 75, -- Maximum amount of saved camera movement paths allowed
    MaxPointsPerPath = 1200 -- How long of a recording of camera position movements is allowed, essentially
}

-----------------------------------------
-------- Filters & Visual Effects -------
-----------------------------------------
-- You can find more timecycles by going here: https://wiki.rage.mp/wiki/Timecycle_Modifiers

Config.Filters = {
    { label = 'None', labelKey = 'filters.none', value = 'none', timecycle = nil, strength = 0.0 },
    { label = 'Vignette', labelKey = 'filters.vignette', value = 'vignette', timecycle = 'scanline_cam_cheap', strength = 0.35 },
    { label = 'Cinematic Contrast', labelKey = 'filters.contrast', value = 'contrast', timecycle = 'cinema', strength = 0.45 },
    { label = 'Bright Broadcast', labelKey = 'filters.bright', value = 'bright', timecycle = 'MP_corona_heist_DOF', strength = 0.25 },
    { label = 'Dark Grit', labelKey = 'filters.dark', value = 'dark', timecycle = 'yell_tunnel_nodirect', strength = 0.45 },
    { label = 'Noir', labelKey = 'filters.noir', value = 'noir', timecycle = 'NG_blackout', strength = 0.75 }
}

------------------------------------
------------- LOCALES --------------
------------------------------------

-- Overlay text
Config.ControlOverlay = {
    { label = 'overlay.freecam.label', description = 'overlay.freecam.description' },
    { label = 'overlay.menu.label', description = 'overlay.menu.description' },
    { label = 'overlay.move.label', description = 'overlay.move.description' },
    { label = 'overlay.vertical.label', description = 'overlay.vertical.description' },
    { label = 'overlay.mouse.label', description = 'overlay.mouse.description' },
    { label = 'overlay.roll.label', description = 'overlay.roll.description' },
    { label = 'overlay.fov.label', description = 'overlay.fov.description' },
    { label = 'overlay.pitch.label', description = 'overlay.pitch.description' },
    { label = 'overlay.overlay.label', description = 'overlay.overlay.description' }
}

```

***

### 🫳 How to Use

**Opening the Menu**

* Type `/freecam` in the chatbox or `freecam` in F8

**Camera Modes**

* Freecam: Move the camera anywhere with ease
* Follow: Follow a target vehicle/ped/player as they move. Define your own offset by moving the camera
* Orbit: Orbit/rotate the camera slowly at an offset from a target&#x20;

**Manipulating the Camera in Freemode**

* First select a target under 'Targets'
* Set your follow offset and settings in the menu
* Close the menu
* Use WASD to move the camera on the X and Y axis
* Use mouse to move the camera's rotation and 'look' around
* Use Space and Ctrl to move the camera up/down
* Use Q & E to tilt the camera side to side
* Use Shift + Scroll Up/Down to tilt the camera up/down

**Manipulating the Camera in Orbit Mode**

* First select a target under 'Targets'
* Set your orbit offset/height in the menu
* Close the menu
* Use A & D to rotate quicker either way
* Use W & S to zoom in/out of the target entity
* Use SPACE & Ctrl to move the camera up/down

**Manipulating the Camera in Follow Mode**

* Use WASD to move the camera on the X and Y axis
* Use mouse to move the camera's rotation and 'look' around
* Use Space and Ctrl to move the camera up/down
* Use Q & E to tilt the camera side to side
* Use Shift + Scroll Up/Down to tilt the camera up/down

**Change Screen Visuals**

* Open the 'Visuals' submenu.
* Set a filter/timecycle with the dropdown on the left.
* Configure depth of field on the right. Make sure to select 'Apply DoF' to apply any changes.

**Spawning Lights**

* Open 'Lights' submenu
* Enter a label (nobody else sees this, it's for your records only)
* Choose type of light from the options:
  * Spotlight: Spawns a spotlight in the direction and angle the camera is facing with the given settings
  * Fill: Spawn a multitude of lights in the area of the camera to provide environmental/scene lighting (e.g. for sun simulation)
* Choose your colour, range, strength, shadow, radius and falloff.
* Choose whether to show a marker whilst the light is active. This will place a circular marker around the light entity whereas if left unchecked, this would be invisible.
* Spawn at camera and admire your work.

**Deleting Lights**

* Open the 'Lights' submenu and delete the relevant light you wish to remove from the right.&#x20;

**Recording Keyframes Automatically**

* Open the 'Recorder' submenu
* Select the 'record' button at the top
* Close the menu
* Move the camera in whatever way you wish - The camera movements will be recorded, and keyframes will be generated.
* You can then re-play the keyframes generated by selecting 'play' in the top of the submenu.

**Adding Keyframes Manually**

* For finer tuning, you may wish to input keyframes manually. To do so:
* Open the 'Keyframes' submenu
* Move the camera to where you wish the first frame to be located
* Fill in the relevant boxes and apply the playback speed and interpolation you desire
* Re-open the menu and select 'Add Current Camera' to add a keyframe where the camera is.
* Add as many keyframes as you wish in this same manner.
* Once you're ready, select 'Play' in the menu and it will play your keyframe route!

**Saving a Keyframe Path**

* Go to Saved Paths&#x20;
* Input the details and select which kind of path you wish to save
* Click 'Save'

**Loading a Keyframe Path**

* Go to Saved Paths
* Select the path you wish to load and select 'Load'

***

### 🗺️ Locales

The active locale is set in `config.lua`:

```lua
Config.Locale = 'en'
```

Locale files live in `locales/*.lua`. To add another language, copy `locales/en.lua`, rename it, and change `Locales.en` to your new locale key. For example:

```lua
Locales.fr = {
    -- translated keys here
}
```

Then set within config.lua:

```lua
Config.Locale = 'fr'
```

***

### 🧠 Tips

* Use the lighting system to your advantage - Good lighting makes the difference in any shot.
* Depth of field can either be your best friend or worst enemy - Ensure you know how to use it to achieve maximum results.
* Check out some youtube videos on photography, cinematography and 3D rendering to get an idea of lighting setups - Whilst it may differ to fivem setups, the core concepts are the same.

***

### 💃 Show Off Competition

Join our discord ([RPWorks Discord](https://discord.gg/4pbcACF3NV)) and check out the freecam competition channel to show off your latest work with freecam and be in with a chance to win 20% off your next purchase on our store every month.&#x20;

<sub>Terms: The winner is decided each month by a panel of judges chosen by RP Works developers. The RP Works developers may stand in as judges should they need or desire. The media sent is judged based on quality. Any entries found not to be made using freecam will be removed. Any entries found using AI to enhance the quality will also be removed. Winners are announced within the first week of every month, but due to commitments the date may differ each month.</sub>

***

### ❓ Support

If you need help or encounter issues, please join the [RPWorks Discord](https://discord.gg/4pbcACF3NV) and open a ticket.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://rp-works-modding.gitbook.io/rp-works-modding-docs/freecam-pro.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
