I'm using pitch and roll from CMAttitude to control the position of a point in an iPhone Game. As I start the level, I register the reference attitude and during the game I use
[attitude multiplyByInverseOfAttitude:attitudeRef]
to get the current attitude with regard to the reference, then control the point horizontal position (with the pitch property) and the vertical position (with the roll property).
The problem is, I would like to add a feature to reset only the roll component of the reference attitude attitudeRef to a custom value. CMAttitude euler angles are readonly properties, and I apparently can't create myself a custom CMAttitude object with custom roll and pitch.
How could I do that?