Physics Simulation Forum

 

All times are UTC




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: btSphereShape friction
PostPosted: Wed Mar 13, 2013 12:49 am 
Offline

Joined: Mon Dec 22, 2008 3:13 pm
Posts: 7
Hello.

I was making a huge btRigidBody that uses btBoxShape as ground and I have a cannon which fires spherical (using btSphereShape) bodies. Everything works fine, except after cannon balls hit the ground, they don't stop as expected (after awhile). As they don't use friction with the ground at all. They keep rolling and rolling until ... forever.

What should I do to make them work properly?

Thanks in advance.


Top
 Profile  
 
PostPosted: Wed Mar 13, 2013 1:24 pm 
Offline

Joined: Fri Mar 08, 2013 9:53 am
Posts: 6
You can try to add a damping:

ball->applyDamping(btScalar(0.8));
after the collision.

or

ball->setDamping(btScalar(0.0), btScalar(1.0));
when you create the body.


Top
 Profile  
 
PostPosted: Wed Mar 13, 2013 7:31 pm 
Offline

Joined: Mon Dec 22, 2008 3:13 pm
Posts: 7
Thank you Adriano for your reply.

I was solving this following RollingFrictionDemo sample though, using setFriction & setRollingFriction to btRigidBody objects. :)


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

All times are UTC


Who is online

Users browsing this forum: Baidu [Spider], Bing [Bot], Yahoo [Bot] and 7 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