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.

Dark Physics & Dark A.I. & Dark Dynamix / [DP] Object roataion problems.

Author
Message
Sunflash
19
Years of Service
User Offline
Joined: 28th Jun 2005
Location: Seattle, Wa
Posted: 8th Feb 2007 08:42
Hey, can someone with a bit more knowledge of DP look at this for me? Why dosen't the cube in this snippet rotate correctly?



To get it to move at all, you need to press two arrow keys at the same time, but even then, it won't rotate corectly.
Thanks,
-Sunflash

Mountain Dew, happyness in a bottle.
bosskeith
18
Years of Service
User Offline
Joined: 5th Dec 2005
Location:
Posted: 10th Feb 2007 01:42
you are trying to implement virtual rotation into a real physics environment...once you make it a part of the physics world you lose virtual control of the object and need to apply forces to get rotations, unless you delete it from the physics world and reorient it and add it back in.

Sunflash
19
Years of Service
User Offline
Joined: 28th Jun 2005
Location: Seattle, Wa
Posted: 13th Feb 2007 05:44
Then why does it actually rotate when you press a key combination like the upkey+leftkey?

Mountain Dew, happyness in a bottle.
Trowbee
21
Years of Service
User Offline
Joined: 12th Apr 2003
Location: United Kingdom
Posted: 16th Feb 2007 23:58
Like bosskeith said, you're trying to rotate a physics object with virtual object commands.

While it does rotate when you press 2 keys, it shouldn't (seems more of a bug). Once an object is made to be physics, you can (or should) only be able to use physics commands to manipulate it.

In this case, where you want to rotate, you're right in using phy set rigid body rotation, but use it as one command and update in one go.

I submitted this as a bug, at http://forum.thegamecreators.com/?m=forum_view&t=100139&b=15 so you can look through it to get what I mean.
Philip
21
Years of Service
User Offline
Joined: 15th Jun 2003
Location: United Kingdom
Posted: 18th Mar 2007 16:45
I'm not convinced that there is a bug with the phy set rigid body rotation command. I've posted some example code under your bug report to explain why I say that.

Cheer if you like bears! Cheer if you like jam sandwiches!
"I highly recommend Philip" (Philip)
Trowbee
21
Years of Service
User Offline
Joined: 12th Apr 2003
Location: United Kingdom
Posted: 19th Mar 2007 21:54
I see your point, but it is still undenyable that the cube in my example is not rotated how it should be.
Surely that on its own merits a bug *somewhere*, even if it isn't on the y-axis as I first suspected?
Philip
21
Years of Service
User Offline
Joined: 15th Jun 2003
Location: United Kingdom
Posted: 19th Mar 2007 22:10
Its not a bug in the software though. Its the logical mathematical consequence of using canonical Euler angles. You guessed rightly when you referred to gimbal lock above.

To get around this, use the code which I posted.

Cheer if you like bears! Cheer if you like jam sandwiches!
"I highly recommend Philip" (Philip)

Login to post a reply

Server time is: 2024-11-24 16:57:33
Your offset time is: 2024-11-24 16:57:33