Ride1234 Posted June 22, 2011 Share Posted June 22, 2011 Good day, scripters First, i know about setPedRotation and about wiki.multitheftauto.com too. I want to rotate my ped to some point and make him look straight at it, but dont know how to calculate the angle of rotation. Can anyone help me? P.S. I want to make a universal function that calculates rotation for any coordinates, so calculate rotation manually isn't a variant. Link to comment
Ride1234 Posted June 22, 2011 Author Share Posted June 22, 2011 (edited) I've tried math.abs(90+ math.deg( math.acos( math.abs(yvalbig-yvalsm)/(math.sqrt( (math.abs(xvalbig-xvalsm))^2 +(math.abs(yvalbig-yvalsm))^2))))) result - rotation is wrong. Edited June 22, 2011 by Guest Link to comment
Kenix Posted June 22, 2011 Share Posted June 22, 2011 Http://wiki.multitheftauto.com/wiki/SetPedLookAt ? Link to comment
Ride1234 Posted June 22, 2011 Author Share Posted June 22, 2011 i need to rotate the whole player, not only his head Link to comment
1B0Y Posted June 22, 2011 Share Posted June 22, 2011 go in local, go to a rotation you want and start runcode Enter this: x,y,z = getElementRotation(getLocalPlayer()) outputConsole(x,y,z) Look in your console after and you got your required rotation Link to comment
Ride1234 Posted June 22, 2011 Author Share Posted June 22, 2011 look what i need: i need to calculate the angle, and do not find players current rotation. Link to comment
LoveFist Posted June 22, 2011 Share Posted June 22, 2011 https://wiki.multitheftauto.com/wiki/FindRotation Link to comment
Ride1234 Posted June 22, 2011 Author Share Posted June 22, 2011 https://wiki.multitheftauto.com/wiki/FindRotation It looks like what i need, i'll try it soon, thank you Link to comment
Other Languages Moderators Lord Henry Posted July 22, 2017 Other Languages Moderators Share Posted July 22, 2017 On 22/06/2011 at 14:31, LoveFist said: https://wiki.multitheftauto.com/wiki/FindRotation This will find the Z axis angle. But how to find de X axis angle? Link to comment
NeXuS™ Posted July 22, 2017 Share Posted July 22, 2017 @Lord Henry, dont bump old posts, create a new one... Link to comment
Other Languages Moderators Lord Henry Posted July 22, 2017 Other Languages Moderators Share Posted July 22, 2017 5 minutes ago, NeXuS™ said: @Lord Henry, dont bump old posts, create a new one... What's the problem with this? It's exactly the same content from the post. I think is not necessary to create another post with the same content. Link to comment
NeXuS™ Posted July 22, 2017 Share Posted July 22, 2017 You arent having the same problem as @Ride1234 was having. It's a 2011 post, and this question got answered. You may bump an old post, if it was created by you, or you are having the same issue. But because this issue is already closed, you may create a new one, as YOUR support post, and maybe we could answer your question aswell, without having to read back into the 2011 comments, and functions. Link to comment
Other Languages Moderators Lord Henry Posted July 22, 2017 Other Languages Moderators Share Posted July 22, 2017 3 minutes ago, NeXuS™ said: You arent having the same problem as @Ride1234 was having. It's a 2011 post, and this question got answered. You may bump an old post, if it was created by you, or you are having the same issue. But because this issue is already closed, you may create a new one, as YOUR support post, and maybe we could answer your question aswell, without having to read back into the 2011 comments, and functions. The post only answer about the Z axis, but I need to do it with the X axis...its the same content but not exactly the same problem. Link to comment
NeXuS™ Posted July 22, 2017 Share Posted July 22, 2017 I wanted to help ya @Lord Henry, because it would be easier for us, to answer your question, if you could write down your OWN problem, and not refer to other's. And btw, yeah, you can use MY signature, which I created for MYSELF, not for other's. Thanks for asking for it mate. Link to comment
Other Languages Moderators Lord Henry Posted July 22, 2017 Other Languages Moderators Share Posted July 22, 2017 Just now, NeXuS™ said: [...]And btw, yeah, you can use MY signature, which I created for MYSELF, not for other's. Thanks for asking for it mate. Sorry by that...U want me to remove it? By the way, I will create another post with this problem with X axis. Link to comment
NeXuS™ Posted July 22, 2017 Share Posted July 22, 2017 Nah, you can use it as it's a public image. But at least you could ask for it, if you have seen it, and you thought it's cool. 1 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