Pitch,Yaw and roll
BlitzMax Forums/MiniB3D Module/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. | 
| 
 | ||
| Did you ever get this working? | 
| 
 | ||
| You can use Warner's version to get around this problem. Cheers Charlie | 
| 
 | ||
| Yes, excellent.  I will work on converting them to c++ | 
| 
 | ||
| I've been away from Minib3d for a while, where do we get Warner's version from? | 
| 
 | ||
| I have put the copy I downloaded in Dropbox: http://dl.dropbox.com/u/3397800/sidesign.zip Cheers Rob | 
| 
 | ||
| Thanks.  I'll give that a try. | 
| 
 | ||
| If you only need the steering you can check out the minib3d version of my spiral galaxy where I used a special "Turncam" function to get around this problem. http://www.blitzbasic.com/codearcs/codearcs.php?code=2777 check the last post there |