Page 1 of 1

Directional Friction

Posted: Thu Mar 17, 2016 10:52 pm
by worm
It doesn't look like there's any way to implement this, is there?

To be more specific, if I have a (small) worm, and I want it to crawl, if it's on agar, it creates a small channel due to water pressing down on it. This channel prevents the worm from moving sideways when it wriggles, and thus, it moves forward.

Another example, would be a snake -- snake skin exhibits reduced friction in one direction, (presumably) facilitating forward motion.

If directional friction isn't possible, are there any suggestions? One possibility is to affix wheels to the bottom, much like a train, so that movement would be restricted more laterally (due to friction of the wheel against the ground) than it would be forward/backward.

Re: Directional Friction

Posted: Fri Mar 18, 2016 2:17 am
by Basroil
You can try implementing anisotropic friction with a custom collision callback. (http://www.bulletphysics.org/mediawiki- ... d_Triggers)

You might be able to get away using mostly default friction code as your base

Re: Directional Friction

Posted: Fri Mar 18, 2016 11:39 pm
by worm
Interesting, I hadn't thought of that. I might give that a go. Thanks for the suggestion.

Re: Directional Friction

Posted: Sat Mar 19, 2016 10:19 pm
by DannyChapman
What's wrong with the btCollisionObject::setAnisotropicFriction function?!

Re: Directional Friction

Posted: Sun Mar 20, 2016 4:06 am
by Basroil
DannyChapman wrote:What's wrong with the btCollisionObject::setAnisotropicFriction function?!
I completely forgot about that :shock:

Re: Directional Friction

Posted: Mon Mar 28, 2016 2:32 pm
by worm
DannyChapman wrote:What's wrong with the btCollisionObject::setAnisotropicFriction function?!
I had no idea that existed -- likely my fault, but I've found the bullet documentation particularly challenging to parse. Thank you very much for pointing that out.