LabiVila Posted March 2, 2018 Share Posted March 2, 2018 Hello, I need some help finding a specific angle. So let me start, I want this: I need to get local player's rotation and display the rotation he has to do in order to be looking on the direction of the object. Like: 'you have to turn `degrees` to face the object'. I can't seem to do the right math, thank you in advance! Link to comment
_DrXenon Posted March 4, 2018 Share Posted March 4, 2018 there is a useful function called findRotation. use it to find the rotation between the object and the ped. Then getPedRotation or getElementRotation to get the rotation of the ped. After that you will just need to decrease the small angle from the big angle. So if rotation between an object and ped is 350 and the ped's rotation is 180 then he has to turn 350-180= 170 degrees. 2 Link to comment
LabiVila Posted March 6, 2018 Author Share Posted March 6, 2018 Thank you, got it done! 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