Jump to content

Get client camera elevation


Mishqutin

Recommended Posts

I am making a vehicle turret. So far I've made a function that rotates the turret horizontaly:

function rotateTurret()
    local rotation = getPedCameraRotation(getLocalPlayer())
    local veh = getPedOccupiedVehicle(getLocalPlayer())
    local _, _, vehRotation = getElementRotation(veh)
    setElementAttachedOffsets(vWeapon, 0, 0, 2, 0, 0, 0-vehRotation-rotation+90)
    if vWeapon then setTimer(rotateTurret, 100, 1) end
end

And I couldn't find function returning elevation of player's camera.

Edited by Mishqutin
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...