priyen Posted November 29, 2011 Posted November 29, 2011 (edited) I seem to have a logic problem. I can't find out how i can make one object point to another. Here is an example scenario, car2 needs to point to car1. eg. ---------------- car1---> (direction it is facing, E) car2 (should face NorthEast, but im not sure how i would be able to do that) * in terms of rotation, height isn't needed. only x,y any ideas? Edited November 29, 2011 by Guest
Castillo Posted November 29, 2011 Posted November 29, 2011 Maybe this function can help you: https://wiki.multitheftauto.com/wiki/FindRotation
priyen Posted November 29, 2011 Author Posted November 29, 2011 WOW. Perfect. Thank You! now i feel stupid i couldn't find that page. How would i make it work for : setElementRotation findRotation only returns 1 arg
Castillo Posted November 29, 2011 Posted November 29, 2011 setElementRotation(vehicle, 0, 0, findRotation(x, y, x2, y2)) You should check the example.
priyen Posted November 29, 2011 Author Posted November 29, 2011 Sorry, ill try to be more careful / conscious next time, and thank you, that's exactly what i needed.
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