Linear Damping and gravity

mcaden

19-09-2008 13:40:24

There are multiple threads about gravity not working and different ways of calculating gravity (none of which seem to work very well for me without unwanted side-effects), but I don't think anybody has pointed out that gravity seems to work fine at 0 LinearDamping, but floats very slowly at 10.

Shouldn't LinearDamping be ignored by gravity?

mcaden

21-09-2008 15:52:58

No thoughts on this from anybody?

I feel gravity should be constant, and applied after all other forces (so I guess onFrameEnded(...)?) and should ignore all sort of LinearDamping. I understand some things should fall faster/slower than others. Maybe there can be a GravitationalDamping( feather might be 10, rock would be 0, parachute might be 5)?

Currently it seems unless you do some extra addForce function in the right place in your code you need to set LinearDamping to 0 to get decent gravity...but that means your object moves like it's sliding on ice.

Either I'm totally misunderstanding or I'm totally using the system wrong.


If this is acknowledged I'm not THAT knowledgeable in physics so I'm not sure I could be the one to correct it. If I'm corrected and somebody can tell me a good way to have correct(ish) gravity so my objects fall correctly while NOT sliding like they're on ice...all the better.

betajaen

21-09-2008 16:11:07

I agree; but in real-life we don't have a damping property. So in the fake physics work damping applies to acceleration and forces.

Perhaps, you can have some sort of collision contact callback to apply no damping whilst the actor is falling, but once it hits something and settles apply damping to it.

mcaden

21-09-2008 16:55:21

In the formula which determines gravity is there no way to negate the damping?

betajaen

21-09-2008 17:03:09

I would expect so. But such a formula is in a compiled DLL which we have no access to.

mcaden

22-09-2008 17:11:40

Just doesn't make sense to me that gravity works so horribly for dynamic objects.

Obviously nobody else is having the problem to the extent I'm having it...I must be setting something wrong. I'll play more with damping and mass and try to get it right.