I am trying to set up a pitch yaw roll style rotation for a programming project. Currently, I'm rotating defining each axis of rotation as:
Yaw Axis = (0,0,1) Pitch Axis = (0,1,0) Roll Axis = (1,0,0)
My issue is that when the object 'rolls' it should then pitch in the axis relative to it's new rotation, however as I'm always defining the axis for pitch as (0,1,0) it always pitches up or down, regardless of orientation. How do I calculate the axis that is perpendicular to my objects new rotation?