The problem with cancelling the roll is in defining precisely what the roll is for an arbitrary rotation. This is independent of the implementation, whether it be as matrix, quaternion, axis-angle, or Euler angles. There is no consistent definition.
The stated cancellation:
If you want to cancel roll on your rotation, you could convert the quaternion to axis-angle and then just set the angle component to 0.
would actually cancel the entire rotation since a rotation with angle component 0 is the identity rotation.
I don’t think that the axis-angle representation is used much because it is pretty close to the quaternionic representation but has a couple of disadvantages that quaternions don’t have. So by the time you’ve gotten to axis-angle then you may as well go all the way to quaternions.
Anyway, I figured out a way to cancel the roll and Ignatz seems fairly happy with it. So far, at least.
@Ignatz Stop posting stuff on Gisthub. I have to get onto my computer every freaking time I want to download one of your big projects. Just use codepad. you can paste anything with any amount of lines you want.
Maybe you should show your comments to someone else before you post them, to see what they think, because you won’t get much help on this forum if you keep posting rude comments like those above.
And I’m sorry if I don’t feel like helping you. A brief apology three weeks late is not much good.
@Crumble - it takes quite a lot of work, but it is absolutely the best thing about Codea, I think. Flying is actually harder than just walking round on a 3D surface, so I would start with walking around…
I have ebooks on all this stuff when you’re ready. You just need to be comfortable with 2D Codea first, including meshes.
@ignatz sorry to resurrect an old thread, but just wanted to let you know that the flying code on the github seems incompatible with the latest codea- i had to add an _ENV=localise() to the first line of each of the demos to make it work.
Many, many thanks for making flying comprehensible!