Pitch,Yaw and roll

BlitzMax Modules Forums/MiniB3D/Pitch,Yaw and roll

Hi,

I am working on a spacesim but have some problems.
When i roll mi ship 90 pitch becomes yaw.
Is there any way to fix this?

Here is a demo + source to show what i mean:
http://www.ferretdesign.be/spacesim/SpaceSim.zip

Thx,

Ferret

No, it's a phenomenon called "gimbal lock". You can get around it by using quaternions or by limiting the pitch of your ship so it never quite hits 90 degrees in pitch.

Thats bad, i never used quaternions.
Any examples on how to use quaternions for this?

In Blitz3D you can get around this by using TurnEntity. In MiniB3D you can't, as TurnEntity doesn't work properly. I am working on this now however and hope to get it working in the next version.