Physics Simulation Forum

 

All times are UTC




Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Tue Apr 18, 2017 10:49 am 
Offline

Joined: Tue Apr 18, 2017 10:28 am
Posts: 2
Hello,

I'm currently trying to implement snake simulator, where You move a snake based on basic principles of snakes movements.

Snake is built from simple cubes, joined with ConeTwist constraints. Swing limit is 30 degrees, twist limit is 45 degrees.

Main plan was to use friction, that snakeskin normally has - biggest friction when sliding backwards, smaller when sliding to the side, smallest when sliding forward. Using this, snake moves forward by using his muscles to bend and kinda "push off" using friction.

When I read that anisotropic friction is implemented, I was sure that it's doable...but later on I saw that it's only linear friction per axis (which is still good, but not what I'm looking for).

Is it possible to somehow implement this kind of friction? Maybe by combining multiple functionalities from bullet and multiple dampings, frictions etc? Maybe I could implement a function that would give bullet friction for a given rigidBody and a direction - if so, where could I put it or how could I 'attach' it to Bullet?

All answers are really appreciated, as I am in a little bit of a hurry :(


Top
 Profile  
 
PostPosted: Tue Apr 18, 2017 4:08 pm 
Offline

Joined: Tue Apr 18, 2017 10:28 am
Posts: 2
Right now I'm just using my own Solver, which is almost copy/paste btSequentialImpulseConstraintSolver, but with applyAnisotropicFriction() function changed.
Function checks whether local direction is forward or backward (basically...it just checks sign) and if it's backwards, it multiplies vector in that direction.

If anyone has better idea how to implement this or how to improve current solution, please share with me ;)


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC


Who is online

Users browsing this forum: Google [Bot] and 15 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group