Directional Friction

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

Directional Friction

Post by worm » Thu Mar 17, 2016 10:52 pm

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 » Fri Mar 18, 2016 2:17 am

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 » Fri Mar 18, 2016 11:39 pm

Interesting, I hadn't thought of that. I might give that a go. Thanks for the suggestion.

DannyChapman
Posts: 85
Joined: Sun Jan 07, 2007 4:29 pm
Location: Oxford, England
Contact:

Re: Directional Friction

Post by DannyChapman » Sat Mar 19, 2016 10:19 pm

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 » Sun Mar 20, 2016 4:06 am

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 » Mon Mar 28, 2016 2:32 pm

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