SuperBrandy Posted August 28, 2014 Share Posted August 28, 2014 Hi there! I hope someone can help me, i got a little problem with the ped rotation. local x,y,z = getElementPosition(getLocalPlayer()) local rotx, roty, rotz = getElementRotation(getLocalPlayer()) setElementPosition(Ped, x + 1 , y, z) setElementRotation(Ped, rotx, roty, rotz) The Problem is that the ped rotates z-axis exact the other way then i am. For example while i got a z-rotation of 0 the Ped also got 0. But while i am having a rotation of 30 degrees the ped has a rotation of 330 degrees. I don't know why. I also tried to let the ped walk with setPedAnimation( Ped, "ped", "WALK_player") and setPedControlState(Ped, "forwards", true) The Problem there is, that the ped walks more backwards if the rotation gets nearer to 180 degree. At 180 and 270 degree the ped walks straight bachwards while the animation seems to go forwards so in the opposite direction. Thanks for help! Link to comment
MTA Team ccw Posted August 28, 2014 MTA Team Share Posted August 28, 2014 Try setting 'conformPedRotation' to true https://wiki.multitheftauto.com/wiki/SetElementRotation Link to comment
SuperBrandy Posted August 28, 2014 Author Share Posted August 28, 2014 Thanks a lot :3 I should read the wiki pages better! 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