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 / Dark Physics walking boxes

Author
Message
trogdor
21
Years of Service
User Offline
Joined: 15th Apr 2003
Location: Portsmouth, VA, USA
Posted: 1st Dec 2008 22:59
I stacked five boxes in a column with a for loop.
I noticed that sometimes the stacked boxes keep swaying back and forth which causes the whole stack to start walking (tiny steps, but walking non the less).

It's funny seeing a stack of boxes walking through your game.

Is there a way to stabilize the stack? I've seen this phenomenon before in ODE.

If you give someone a program, you will frustrate them for a day; if you teach them how to program, you will frustrate them for a lifetime.
BillR
21
Years of Service
User Offline
Joined: 19th Mar 2003
Location: United States
Posted: 10th Dec 2008 23:56
trogdor - I would like to see if your boxes move on my system, please post the test code so I can try it, thanks!

I hope it is just a small amount of code, easier to check that way.
trogdor
21
Years of Service
User Offline
Joined: 15th Apr 2003
Location: Portsmouth, VA, USA
Posted: 11th Dec 2008 21:34
I modified the advanced terrain Example found under
Dark Basic Professional\Help\Advanced Terrain

the cylinder stacks are wobbly, some collapse, some stabilize, and some just keep on wobbling and taking tiny steps.

If you give someone a program, you will frustrate them for a day; if you teach them how to program, you will frustrate them for a lifetime.

Attachments

Login to view attachments
BillR
21
Years of Service
User Offline
Joined: 19th Mar 2003
Location: United States
Posted: 14th Dec 2008 23:42 Edited at: 14th Dec 2008 23:44
trogdor - sorry it took so long, I have been working 7 days a week

In the PhysX world (and ODE for that matter) objects have properties that define the way they interact with other objects
PhysX sets default properties that work well in many cases, stacked objects is one area where it doesn't work so well.

The key to controlling stacked objects, and other situations where you want the default PhysX properties to work differently
is to set up a 'material' for the objects to use. Be sure to read about materials in the PhysX docs.

Here is your code with a 'resting' material defined, and then applied when you set up the dynamic objects by assigning the material to use.

hope this helps!
trogdor
21
Years of Service
User Offline
Joined: 15th Apr 2003
Location: Portsmouth, VA, USA
Posted: 16th Dec 2008 20:10
Thanks,
The material helped a lot.
I'm tweaking the material now to fit my game.
Thanks again

If you give someone a program, you will frustrate them for a day; if you teach them how to program, you will frustrate them for a lifetime.

Login to post a reply

Server time is: 2024-11-24 18:44:01
Your offset time is: 2024-11-24 18:44:01