- Home /
Question by
MizoTheDev · Jan 31, 2017 at 08:35 PM ·
rotationvector3axisrotation axis
Get angle around a specified axis.
Hey there!
I am trying to get the angle of rotation of an object around a specified Vector3 axis, is there any way to do that in Unity?
Comment
I'd think that you would need to specify a 'zero' rotational vector to that as well, then you could use Vector3.Angle method.
Quaternion.LookRotation might be of some use as well, but apart from that, I think you'll need to dabble a little bit around Vector algebra and design a function yourself.
Do you mean along a basic x/y/z axis, or a more complex axis? If it's the basic axis, you always have eulerAngles. If it's more complicated than that, I'll need an example of exactly what you need
Answer by MizoTheDev · Feb 01, 2017 at 09:08 AM
An axis with a specified vector 3, like (0.6, 0.8, -0.3) for example.