Skream Posted August 19, 2018 Posted August 19, 2018 I have the following code local angleFromCoords = (-math.deg(math.atan2(targetX - sourceX, targetY - sourceY))) % 360 setElementRotation(thePed, 0, 0, angleFromCoords) setPedAimTarget(thePed, targetX, targetY, targetZ + .2) setPedLookAt(thePed, targetX, targetY, targetZ + .2) the ped points to my player and fire all fine. The problem is if I use setPedControlState forwards it just runs like a michael jacksons moonwalk even still lookin to my player
Moderators IIYAMA Posted August 19, 2018 Moderators Posted August 19, 2018 Use: https://wiki.multitheftauto.com/wiki/SetPedCameraRotation 1 Do you want to improve your Lua programming skills and make less mistakes? Start with Lua Language Server! Useful functions 3x Spoiler checkPassiveTimer getScreenStartPositionFromBox getPedGender Tutorials 4x Spoiler Scaling DX Events Attach an addEventHandler on a group of elements Debugging
Skream Posted August 19, 2018 Author Posted August 19, 2018 6 minutes ago, IIYAMA said: Use: https://wiki.multitheftauto.com/wiki/SetPedCameraRotation Can you be more specific? I tried setting setPedCameraRotation same as angleFromCoords before but it didn't work for me (same moonwalk ocurring) I tried setting it that angle + 180 and still same problem 18 minutes ago, IIYAMA said: Use: https://wiki.multitheftauto.com/wiki/SetPedCameraRotation @edit thanks man found this https://bugs.mtasa.com/view.php?id=7349 1
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