- Home /
The question is answered, right answer was accepted
Trigonometry Unit Circle Question
Question SOLVED. Same Question https://answers.unity.com/questions/171254/unit-circle-equation-question.html
Answer by JVene · Nov 13, 2018 at 12:36 PM
I'll focus on your last line. I'll assume that you do need the angle for the z axis, since your data is x,y, but what is supplied to the 3rd parameter of the new Vector3 isn't an angle. Mathematically it isn't much of anything.
You have the angle (angle, from Atan2), so use it. Convert to degrees, as required by localEulerAngles, with something like 'angle * Mathf.Rad2Deg'. Note, however, that localEulerAngles effect on your object may not be oriented exactly the way Atan2 provides. Atan2 assumes that positive direction is counterclockwise, and that zero is a positive x with y at zero (3 o'clock). You may need to re-orient angle if that isn't what you expect. This applies, also, to 'correctOffset', because the orientation of angle provided from Atan2 dominates the orientation there, too.
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
Help Understanding Script 2 Answers
Distribute terrain in zones 3 Answers
slide an object by using mouse. 0 Answers
Is it possible to schedule repeatable notifications using Unity's Notifications Sample package? 0 Answers