off Posted February 2, 2014 Share Posted February 2, 2014 (edited) 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 February 2, 2014 by Guest Link to comment
Bonsai Posted February 2, 2014 Share Posted February 2, 2014 You need to get the Position within that function. Else it isn't updating. Link to comment
off Posted February 2, 2014 Author Share Posted February 2, 2014 You need to get the Position within that function.Else it isn't updating. I do not understand. Could demonstrate? Link to comment
xXMADEXx Posted February 2, 2014 Share Posted February 2, 2014 function Camera() local x, y, z, _, _, _ = getCameraMatrix ( ) setCameraMatrix ( x, y+5, z, x, y, z ) end addEventHandler ( "onClientRender", root, Camera) Link to comment
off Posted February 2, 2014 Author Share Posted February 2, 2014 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
myonlake Posted February 3, 2014 Share Posted February 3, 2014 You can't, unless you make your own camera system. Link to comment
Noki Posted February 3, 2014 Share Posted February 3, 2014 You can always use wiki.multitheftauto.com/wiki/smoothMoveCamera to help you. Link to comment
myonlake Posted February 3, 2014 Share Posted February 3, 2014 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. Link to comment
off Posted February 3, 2014 Author Share Posted February 3, 2014 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
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now