Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

3 Dimensional Chat / Gimbal Lock and Rotation from Hell

Author
Message
Licaon
22
Years of Service
User Offline
Joined: 30th Sep 2003
Location: Far in the south
Posted: 29th Dec 2003 16:36
Hi. After singular success in the flatland, i've stepped in the planet of cubes,spheres and triple-axis.

I'd made a program that 'locks' an enemy and orients the ship towards it.
It's basicaly a dummy object in the center of the seeker ship. It points to destination via "point to " method, the resulting angles are taken as destination for the seeker rotation (using turn, pitch and roll). Now, here comes the horror:

Gimbal lock

Every time the enemy is located more than 90 deg (having deg orientation 0 as z+) the angles get messed up. Result: the ship only chases targets directly in front of it. any thing beyond that narrow cone, makes the ship to go berserk in to the deep space.

any help? please?

9 of every 10 people are exactly the 90 %
Philip
23
Years of Service
User Offline
Joined: 15th Jun 2003
Location: United Kingdom
Posted: 29th Dec 2003 17:21
Use quarternions? They do not suffer from gimbal lock.

Philip

What do you mean, bears aren't supposed to wear hats and a tie? P1.3ghz / 384 megs / GeForce MX 5200 128meg / WinXP home
Licaon
22
Years of Service
User Offline
Joined: 30th Sep 2003
Location: Far in the south
Posted: 29th Dec 2003 17:55
mmm...i'll look onto it. Let you know how it goes

9 of every 10 people are exactly the 90 %
Licaon
22
Years of Service
User Offline
Joined: 30th Sep 2003
Location: Far in the south
Posted: 29th Dec 2003 18:14
looked about quaternions, no idea on how implement it...it's the only way?

9 of every 10 people are exactly the 90 %

Login to post a reply

Server time is: 2026-07-05 13:16:26
Your offset time is: 2026-07-05 13:16:26