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 / Rigid Body/Dynamic Sphere Gravity

Author
Message
culmor30
17
Years of Service
User Offline
Joined: 16th Jun 2007
Location: In my head.
Posted: 23rd Aug 2007 23:29
This might be a noobish question, but can I set the gravity to 0 for a single dynamic sphere? Here's what I want to do:

I have a stack of boxes in the center of a level. When you leftclick, you shoot a sphere. Everything there is done. I just need to make the (moving) sphere have an effect on the dynamic boxes in the level. You know, bullet hits a stack of crates, it falls over. How would I go about doing this but not affecting the gravity of the crates or the straight movement of the sphere in any way?

Thanks in advance if possible.
Lucy
17
Years of Service
User Offline
Joined: 19th Apr 2007
Location: Roanoke, VA USA
Posted: 24th Aug 2007 04:02
You can try applying a force of 9.8 on the y axis, this should theoretically negate the effect of gravity on the sphere since gravity pulls down at a rate of 9.8.

If the sphere still appears affected by gravity, i'd try multiplying 9.8 by the sphere's mass.

Nothing I say is intended to be rude. My autism means that I do not know what is rude and what isn't rude. I apologize if I seem rude. It is not my intention.
culmor30
17
Years of Service
User Offline
Joined: 16th Jun 2007
Location: In my head.
Posted: 24th Aug 2007 07:02 Edited at: 24th Aug 2007 07:02
Alright, I'll try that.

Also, my player object (not using the DP char controller) is suspended in the air, but I want to make it a dynamic sphere so it can knock things over when I run into them. Would this method work for that too?

I can see some problems though, such as the player rebounding off of other objects. How can I let my player collide with DP objects without any effect on the player, like in Halo 2 when you push a box or something of that sort? Do I HAVE to use DP's char controller?
Lucy
17
Years of Service
User Offline
Joined: 19th Apr 2007
Location: Roanoke, VA USA
Posted: 24th Aug 2007 08:06
As far as I know, the character controller is the immovable object combined with the irresistable force. It shouldn't be affected by the collisions of dynamic objects. I'm not sure how well it works for interacting though. I'm fairly new to DarkPhysics.

Nothing I say is intended to be rude. My autism means that I do not know what is rude and what isn't rude. I apologize if I seem rude. It is not my intention.
culmor30
17
Years of Service
User Offline
Joined: 16th Jun 2007
Location: In my head.
Posted: 25th Aug 2007 00:28
Yeah, but is it possible for it to be the irresistible force WITHOUT being controlled by the DP character controller?

If I have to I guess I can attach the controller.
Lucy
17
Years of Service
User Offline
Joined: 19th Apr 2007
Location: Roanoke, VA USA
Posted: 25th Aug 2007 03:05
you could always use a ridiculously high mass on the object that you want to be the irresistable force.

Nothing I say is intended to be rude. My autism means that I do not know what is rude and what isn't rude. I apologize if I seem rude. It is not my intention.
culmor30
17
Years of Service
User Offline
Joined: 16th Jun 2007
Location: In my head.
Posted: 26th Aug 2007 02:13
Yeah, 473892165083426487310546237189578493.0083 should do.

The only problem is it has to be suspended in the air, and a mass that high would make it fall.
Lucy
17
Years of Service
User Offline
Joined: 19th Apr 2007
Location: Roanoke, VA USA
Posted: 26th Aug 2007 08:52 Edited at: 26th Aug 2007 08:58
Quote: "Yeah, 473892165083426487310546237189578493.0083 should do."


A few million should be more than enough. A number that high probably won't work. I'm not sure what size the pipeline is or what PhysX uses, but a safe bet is 32bits. A 32bit float would mean that you can't get more than 7 significant digits. So the number you quoted would likely clip out to 473892100000000000000000000000000000.0 and that's assuming it can even hit that many zeros.

Also, if you have it constantly apply an upward velocity of 9.8, then it won't fall...

You take a basketball and make it accellerate upward at a constant rate of 9.8 (that's 9.8 meters per second, per second), then it'll suspend itself in mid air. You do the same thing with a car, a tank, or with NASA's "Crawler", they'll all be suspended. All you have to do is negate gravity by applying an opposite force. This is why I suggest trying a large mass and giving it a constant upward velocity of 9.8. If it still falls, try 9.8 times object's mass.

It really all depends on whether the application of force to an object in the DP commands takes mass into account. If the force is "absolute speed of x" or "this much energy is applied". The latter needs you to multiply by mass.

Nothing I say is intended to be rude. My autism means that I do not know what is rude and what isn't rude. I apologize if I seem rude. It is not my intention.
Twisted Steel Software
17
Years of Service
User Offline
Joined: 21st May 2007
Location: Teh Interwebs
Posted: 30th Aug 2007 21:54
phy set rigid body gravity object,0 is what you're looking for.

Intel Pentium 4 3.40 Ghz HT, 1.5 GB RAM, Nvidia Geforce 6800, 19" Dell CRT Monitor ... I need to upgrade ^-^
culmor30
17
Years of Service
User Offline
Joined: 16th Jun 2007
Location: In my head.
Posted: 8th Sep 2007 07:22
Thanks much, stupid undocumented commands...

Login to post a reply

Server time is: 2024-11-24 21:59:19
Your offset time is: 2024-11-24 21:59:19