Jump to content

[HELP]setCameraMatrix


off

Recommended Posts

How can I set the camera and still be able to move it naturally?

local x, y, z = getElementPosition(localPlayer) 
  
function Camera() 
    setCameraMatrix ( x, y+5, z, x, y, z ) 
end 
addEventHandler ( "onClientRender", root, Camera) 

EXCUSE ME FOR MY BAD ENGLISH!

Edited by Guest
Link to comment
function Camera() 
    local x, y, z, _, _, _ = getCameraMatrix ( ) 
    setCameraMatrix ( x, y+5, z, x, y, z ) 
end 
addEventHandler ( "onClientRender", root, Camera) 

Actually I do not want it. I'm setting a camera to the player and I want to move it(the camera) by mouse. EXCUSE ME FOR MY BAD ENGLISH!

Link to comment
You can always use wiki.multitheftauto.com/wiki/smoothMoveCamera to help you.

That's not efficient for free camera movement. It's better to make your own camera system and calculate a sphere around the character.

I think will forget, do not know LUA enough to do 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...