Directional Friction

Post Reply
worm
Posts: 3
Joined: Wed Feb 24, 2016 6:04 pm

Directional Friction

Post 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.
Basroil
Posts: 463
Joined: Fri Nov 30, 2012 4:50 am

Re: Directional Friction

Post 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
worm
Posts: 3
Joined: Wed Feb 24, 2016 6:04 pm

Re: Directional Friction

Post by worm »

Interesting, I hadn't thought of that. I might give that a go. Thanks for the suggestion.
DannyChapman
Posts: 84
Joined: Sun Jan 07, 2007 4:29 pm
Location: Oxford, England
Contact:

Re: Directional Friction

Post by DannyChapman »

What's wrong with the btCollisionObject::setAnisotropicFriction function?!
Basroil
Posts: 463
Joined: Fri Nov 30, 2012 4:50 am

Re: Directional Friction

Post by Basroil »

DannyChapman wrote:What's wrong with the btCollisionObject::setAnisotropicFriction function?!
I completely forgot about that :shock:
worm
Posts: 3
Joined: Wed Feb 24, 2016 6:04 pm

Re: Directional Friction

Post 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.
Post Reply