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