Pitch,Yaw and roll

BlitzMax Forums/MiniB3D Module/Pitch,Yaw and roll

Ferret(Posted 2007) [#1]
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


Warren(Posted 2007) [#2]
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.


Ferret(Posted 2007) [#3]
Thats bad, i never used quaternions.
Any examples on how to use quaternions for this?


simonh(Posted 2007) [#4]
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.


Rob Pearmain(Posted 2012) [#5]
Did you ever get this working?


jkrankie(Posted 2012) [#6]
You can use Warner's version to get around this problem.

Cheers
Charlie


Rob Pearmain(Posted 2012) [#7]
Yes, excellent. I will work on converting them to c++


dynaman(Posted 2012) [#8]
I've been away from Minib3d for a while, where do we get Warner's version from?


Rob Pearmain(Posted 2012) [#9]
I have put the copy I downloaded in Dropbox:

http://dl.dropbox.com/u/3397800/sidesign.zip

Cheers

Rob


dynaman(Posted 2012) [#10]
Thanks. I'll give that a try.


Krischan(Posted 2012) [#11]
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