damping a function of velocity

User avatar
leo
Posts: 11
Joined: Fri Apr 17, 2009 4:12 pm
Location: europe

damping a function of velocity

Post by leo »

Hi there,

as I read in the last entry of the thread http://www.bulletphysics.com/Bullet/php ... ity#p10875 damping is dependent of velocity.

Does this apply to linear and angular damping in the btRigidBody::setDamping (btScalar lin_damping, btScalar ang_damping)?

Thanks Leo
sparkprime
Posts: 508
Joined: Fri May 30, 2008 2:51 am
Location: Ossining, New York

Re: damping a function of velocity

Post by sparkprime »

that is the only damping

and yes, the factors you supply are the proportion of velocity lost per second.

most people do not need to simulate 'real' damping, this simple approximation is good enough.
User avatar
leo
Posts: 11
Joined: Fri Apr 17, 2009 4:12 pm
Location: europe

Re: damping a function of velocity

Post by leo »

Hi sparkprime,

thanks for you reply!
that is the only damping
I'd guess it has to be....angular damping and linear damping are the only damping?!
and yes, the factors you supply are the proportion of velocity lost per second.
damping = -kv -> I set k in the damping function btRigidBody::setDamping (btScalar lin_damping, btScalar ang_damping)?

Cheers Leo
sparkprime
Posts: 508
Joined: Fri May 30, 2008 2:51 am
Location: Ossining, New York

Re: damping a function of velocity

Post by sparkprime »

Actually there is some other damping stuff going on, called 'extra damping' but I think it's a hack and it works in a similar fashion.

Of course you can implement your own damping by applying forces every graphics frame or impulses every internal step. I have a simple system where objects tend to face a certain direction when in free-fall, makes things look a little more realistic.

Bear in mind that -kv is the velocity change per second, per internal step you will see much less change than this, because there are several internal steps per second.