rolling the dice....

Started by
2 comments, last by jasonf 21 years, 9 months ago
i''ve tried a few different ways, but i can''t seem to properly represent a tumbling die. I''m trying to recreate a version of the game Devil Dice just for fun and am having problems getting the dice to roll properly. here''s the basic setup. if you press an arrow key, the die then rolls 90 degrees on the axis you select. then you roll again and again etc, moving the die around a grid. i''m just storing an overall rotation value for the die for each axis and i know that wont work. I''m running into gimble lock and I''m way too confused about quaternions to use them. Can any of you guys suggest some different ways to deal with this problem? Would I do some calculation based on if a certain axis has gone past 180 degrees? What data would you store/update and how would can i overcome the dreaded gimble lock... Please help me obi-wan kenobi, you''re my only hope!
Jason FeserCode Geek / Visuals Guyelasticmediaproductionshttp://www.elasticvisuals.com
Advertisement
Not sure what the answer to your problem is - ... - though I do just-so-happen to have an open sourced (No license) quaternion math library available in my open sourced game engine.

If you want to take a look, visit my website (Link at bottom of post), and go to e y e .Scream -> Downloads -> Infinite .Scream


Thanks for the suggestion, but I''d really like to understand what I''m doing. Implementation without understanding is a big no-no in my books. I appreciate your offer to check your code though - open source projects are a great asset to the community.

Anyone else?

Jason FeserCode Geek / Visuals Guyelasticmediaproductionshttp://www.elasticvisuals.com
http://www.gamedev.net/community/forums/topic.asp?topic_id=55442

I was once trying to recreate DD too, and had exactly the same problem. Dragonus post in that thread will help you quite a lot. I could also provide you some code, but it's ugly & unfinished because I quit that project because lack of time... send me a mail if you're interested anyway.

[edited by - knthrak83 on June 29, 2002 2:10:39 PM]

This topic is closed to new replies.

Advertisement