Jump to content

Camera roll


mommytellme

Recommended Posts

I want the camera to be rotated by the rotation of the plane, so I wrote this code:

function camera () 
local veh = getPedOccupiedVehicle(localPlayer) 
     
    if veh then 
    if getVehicleType(veh) == "Plane" then 
    local raz, dwa, trzy, cztery, piec, szesc = getCameraMatrix() 
    local rotX, rotY, rotZ = getElementRotation(veh) 
    setCameraMatrix(raz, dwa, trzy, cztery, piec, szesc, rotZ) 
     
    end 
    end 
     
    end 
  
addEventHandler("onClientPreRender", root, camera) 

But it does not work, when you enter the Hydra camera locks in place. How do I fix this?

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...