- Home /
Question by
overlord1123 · Jul 09, 2013 at 04:16 PM ·
objectdirectionfacingother
Get the needed rotation to face other object
Hello i don't know how i can get the direction i need to turn to face a other object.
Situation : I got 2 objects, "A" am i and "B" is my target. I am rotated in a random way away from B.
Question: how do i get the needed rotation for "left and right" in degrees and "up and down"? so i get something like "your target is -160 to the left and 50 degrees up"
i know about transform.lookAt but i don't want unity to do that i just need to know the numbers for further scripting a autopilot.
Comment
Answer by Kiloblargh · Jul 09, 2013 at 04:19 PM
Well i now looked in to that and still can't get it to work. Can you be more specific how to get the angles?