JeViCo Posted May 2, 2018 Share Posted May 2, 2018 Hello everyone! I have a question. function cammode () local x,y,z = getElementPosition(localPlayer) x = x + 1 local xx,yy,zz = getPositionInFrontOfElement(localPlayer) xx = xx + 1 setCameraMatrix (x,y,z+0.5,xx,yy,zz+0.5) end This part of code will rotate camera well with vehicle until i change x and xx variables. I can only change the height. When i change x, xx variables camera starts moving around. I want to get x and y variables related to vehicle rotation and feel free to change them as i want. Can someone help or give me an example to make better calculations? Link to comment
Ayush Rathore Posted May 3, 2018 Share Posted May 3, 2018 7 hours ago, Juuve said: Hello everyone! I have a question. function cammode () local x,y,z = getElementPosition(localPlayer) x = x + 1 local xx,yy,zz = getPositionInFrontOfElement(localPlayer) xx = xx + 1 setCameraMatrix (x,y,z+0.5,xx,yy,zz+0.5) end This part of code will rotate camera well with vehicle until i change x and xx variables. I can only change the height. When i change x, xx variables camera starts moving around. I want to get x and y variables related to vehicle rotation and feel free to change them as i want. Can someone help or give me an example to make better calculations? This link might help you to accomplish your task ?. 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