Euler angle rotation in self space problem.

I have a Quaternion rot where I want to rotate in the Y axis so I use rot.eulerAngles.y and it works nicely in world space. Now I want to rotate on the Y axis in self space where the object is rotated in the x axis by 10 degrees. How do I calculate the new euler angle around Y axis. Is there an equation or easy way to work around it? Thanks.

set localEulerAngles (IIRC there is such thing)?


I though you have you object parented to something, but it sounds like you have set some rotation on your object already and you want to set some additional rotation on it (instead of overriding it).

You should do something like this:

localRotation = Quaternion.Euler(10, 0, 0) * Quaternion.Euler(0, rotationAroundYAxis, 0);