πŸ“–
Documentation
  • Welcome!
  • Common Issues
    • Keymaster
    • Updating resources
  • πŸ“„Scripts
    • πŸš™AdvancedParking
      • Installation
      • Commands
      • Exports (server)
      • Exports (client)
      • Events (server)
      • Events (client)
      • FAQ
    • 🚚VehicleTransport
      • Installation
      • How to use it
      • Creating a new transport
      • Exports (client)
      • Events (server & client)
    • πŸ”‘VehicleKeyChain
      • Installation
      • Commands
      • Exports (server)
      • Exports (client)
      • FAQ
    • πŸ—œοΈVehicleClamp - Pre-Release
      • Installation
      • Commands
      • Exports (server)
      • Exports (client)
      • Integration
        • ESX
        • QB
    • πŸ“„VehicleRegistration
      • Installation
      • Exports (server)
      • Exports (client)
    • πŸ“ƒVehicleInteraction
      • Installation
    • πŸ—ΊοΈVehicleTracker
      • Installation
      • Exports (server)
      • Exports (client)
    • 🌐JobTracker
      • Installation
    • πŸ•΅οΈβ€β™‚οΈVehicleForceFirstPerson
      • Installation
    • 🎯BulletRicochet
      • Installation
  • πŸ†“Free Scripts
    • πŸ“žkimi_callbacks
      • Installation
      • Exports (server)
      • Exports (client)
      • Examples
    • 🚜VehicleDeformation
      • Installation
      • Exports (server)
      • Exports (client)
    • 🎦OrbitCam
      • Installation
      • Exports (client)
      • Commands
    • πŸ”οΈEarthquakeSimulator
      • Installation
      • Exports (server)
      • Commands
    • πŸ’€DeathCam
      • Installation
Powered by GitBook
On this page
  • StartOrbitCam
  • EndOrbitCam()
  • UpdateCamPosition
  • SetAutoOrbitSpeed
  • IsOrbitCamActive()
  • IsEntityBeingTracked(entity)
  • GetTrackedEntity()
  1. Free Scripts
  2. OrbitCam

Exports (client)

StartOrbitCam

Starts the orbit camera.

Parameters: position - vector3 - Initial position to focus on. entity - integer? - Entity to track. If set, position will be the offset to the entity. minRadius - float? - Minimum radius the camera will orbit at. maxRadius - float? - Maximum radius the camera will orbit at. transitionSpeed - float? - Time it takes for the transition from gameplay cam to orbit cam (in ms). entityBone - integer? - Bone to track. If set, position will be the offset to the bone.

local offset = vector3(0, 0, 0.5)
local entity = PlayerPedId()
exports["OrbitCam"]:StartOrbitCam(offset, entity)


EndOrbitCam()

Stops the orbit camera.

exports["OrbitCam"]:EndOrbitCam()


UpdateCamPosition

Sets the camera focus to a different position (or updates other values).

Parameters: position - vector3 - Position to focus on. entity - integer? - Entity to track. If set, position will be the offset to the entity. minRadius - float? - Minimum radius the camera will orbit at. maxRadius - float? - Maximum radius the camera will orbit at. entityBone - integer? - Bone to track. If set, position will be the offset to the bone.

local newOffset = vector3(0.5, 0.5, 1.0)
local entity = PlayerPedId()
exports["OrbitCam"]:UpdateCamPosition(newOffset, entity)


SetAutoOrbitSpeed

Sets the camera focus to a different position (or updates other values).

Parameters: speed - float? - Speed at which the camera should orbit. Set to nil to reset. disablePlayerControls - boolean? - If player controls should be disabled.

exports["OrbitCam"]:SetAutoOrbitSpeed(2.0, true)


IsOrbitCamActive()

Check if the orbit cam is currently active.

Returns: bool - True if the camera is currently active.

local isCamActive = exports["OrbitCam"]:IsOrbitCamActive()


IsEntityBeingTracked(entity)

Checks if an entity is being tracked. Omitting entity parameter checks for any entity.

Parameters: entity - integer? - Entity to check.

Returns: bool - If the/any entity is being tracked.

local entity = PlayerPedId()
local isTrackingPlayer = exports["OrbitCam"]:IsEntityBeingTracked(entity)


GetTrackedEntity()

Returns the currently tracked entity.

Returns: integer? - The handle of the tracked entity or nil if there is none.

local trackedEntity = exports["OrbitCam"]:GetTrackedEntity()
PreviousInstallationNextCommands

Last updated 1 month ago

πŸ†“
🎦