How to rotate quaternion around local axis?
I have a child object with local rotation slightly shifted (9, 180, 0). I need to get a quaternion that is going to be that rotation, but turned 40 degrees around the objects local up axis (as if dragging the green y rotation gizmo in the editor).
So far I've tried everything I could google, mostly "multiplying" the local rotation by a quaternion, nothing seems to work properly. Quaternion.Euler, Quaternion.AngleAxis, changing object and quaternion places in the multiplication. Using Transform.TransformDirection / TransformVector or Transform.InverseTransformDirection / InverseTransformVector, and much more.
In many cases above the object rotates around the global Y axis, but I need to make it local. This must be a trivial thing, but could someone explain how to do it?
Your answer
Follow this Question
Related Questions
X-Axis rotation quirk 0 Answers
Why Quaternion.Euler can't rotate 360 Degrees 0 Answers
Raycast don't rotate with object SOLUTION 0 Answers
How to Rotate Quaternion 180 Relative to GameObject? 0 Answers
3 Axis Camera Rotation 0 Answers