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 / [D Phy]Gravity and sync rate 0

Author
Message
nackidno
17
Years of Service
User Offline
Joined: 3rd Feb 2007
Location: Där solen aldrig skiner
Posted: 21st Jul 2008 23:29
Hi, I am having another issue with Dark Physics, I have specified the gravity for an object (In this case the player, a sphere), but the problem is, I either fall down in super speed, or in slow motion. I I for example, set gravity to 1, I fall in super speed, and if I set gravity to 0.9 I fall in slow motion, even 0.99999 makes me fall in slow motion.

Any suggestion on how to fix this? Please answer

// Nackidno

- Elias, Damezean, Nackidno, Wonderboy

AntocGames - http://antocgames.se.nu/
HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 21st Jul 2008 23:59
the standard is -9.8, and a mass of a normal object is 10,000. does that help.

Dark Physics makes any hot drink go cold.
Chewy
18
Years of Service
User Offline
Joined: 1st Jan 2006
Location:
Posted: 22nd Jul 2008 01:44
As HowDo has pointed out, the default is -9.8 you need to have the value a minus. In my PhysX demo because I had to set gravity to -30 odd for it to look right, well, it's still a bit like the boulders are falling in slow motion or they are on the moon lol

MjMAC
---------------------------
Intel Core 2 Quad Q6600 @ 2.4GHz | 2 x XFX 8800GTs Alphadog (SLi) | 3GB RAM (Would be 4 but 32bit windows doesn't pick up past 3)
nackidno
17
Years of Service
User Offline
Joined: 3rd Feb 2007
Location: Där solen aldrig skiner
Posted: 22nd Jul 2008 01:54 Edited at: 22nd Jul 2008 01:55
Hmmm...It falls in hyperspeed when I set gravity to -9.8

My code for clarification:



I'm fairly new to D Phy so if you find any other issue except gravity, please not that as well, thanks.

- Elias, Damezean, Nackidno, Wonderboy

AntocGames - http://antocgames.se.nu/
Kendor
21
Years of Service
User Offline
Joined: 31st Jan 2003
Location: Malta
Posted: 22nd Jul 2008 02:39 Edited at: 22nd Jul 2008 02:40
The command Phy set rigid body gravity instructs the object whether it should be affected by gravity or not. It is not used to assign individual gravity to objects. There is a minor bug that although you set gravity interaction to zero (in your case the 0.999 is taken as zero), the object still moves slightly down.

As you mention in the thread title, your problem relates to the zero sync rate. By doing so, you're allowing the physics simulation to update constantly and as fast as possible. If you change the rate to 60, you'll notice that they will move smoothly.

Theory is when you know something, but it doesn't work. Practice is when something works, but you don't know why.
Programmers combine theory and practice: Nothing works and they don't know why.
sindore
19
Years of Service
User Offline
Joined: 2nd Jul 2004
Location: Bedfordshire, UK
Posted: 22nd Jul 2008 09:48
I`v moded your code, just to help a beginner.




soul sucking devils, twisted body of the damed, slivering slim drips from every poor, sin licking at your ears, and the smell stinging your eyes, and if you don't like it, get out of my kitchen!

Login to post a reply

Server time is: 2024-05-21 02:08:55
Your offset time is: 2024-05-21 02:08:55