# Physics Simulation Forum

 All times are UTC

 Page 1 of 1 [ 3 posts ]
 Print view Previous topic | Next topic
Author Message
 Post subject: Disable bouncing between two rigid bodiesPosted: Tue Apr 09, 2013 5:12 pm

Joined: Tue Apr 09, 2013 4:11 pm
Posts: 2
Hello all !

First of all thanks a lot to the community behind Bullet which is doing a great work, really !

I am coming here because I would like some help to solve a little issue that I have.

I have two rigid bodies. The right one is not moving and has a friction set to 1, while the left one has his friction set to 0, and has its velocity set to (2.0, 0, 0) making it moves like this:

But when the left body hits the right one, it bounces and goes in the opposite direction like this :

I don't want this to happen, I just want that when the left body hits the right one, it stops moving (no bounce at all). I have already tried to set both restitution to 0 but it did not work :s !

Any idea ?

Thanks for your help =) !

PS : I have another question for you guys ^^" ! How could i disable movement of a rigid body along the X axis, but only negatively ? (my body will only be able to go to the left and never to the right no matter what happens)

Top

 Post subject: Re: Disable bouncing between two rigid bodiesPosted: Wed Apr 10, 2013 1:43 am

Joined: Tue Sep 16, 2008 11:31 am
Posts: 123
Might want to try enabling "split impulse". (Assuming you've covered the basics like mass, etc.)
2nd Q: your code can do anything you want after each sim step.

Top

 Post subject: Re: Disable bouncing between two rigid bodiesPosted: Wed Apr 10, 2013 11:37 am

Joined: Tue Apr 09, 2013 4:11 pm
Posts: 2
I have tried your solution for the first question but unfortunately it did not work :s !

For the second question, I think (from what I have read) that 6DoF constraint can solve my problem, but I don't know how to use them at all ^^". I know that to disable movement along the X axis I just have to do:
Code:
myRigidBody->setLinearFactor(btVector3(0, 1, 1));

But I just want to disable movement along the X axis in the "left" direction.
If 6DoF constraint is the solution, can someone explain me how to use it or has any link for a tutorial ? =) (I have done some research but I have not found any simple example and explanations ^^")!

Thanks a lot again =) !

Top

 Display posts from previous: All posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost timeSubject AscendingDescending
 Page 1 of 1 [ 3 posts ]

 All times are UTC

#### Who is online

Users browsing this forum: No registered users and 3 guests

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

Search for:
 Jump to:  Select a forum ------------------ BULLET PHYSICS LIBRARY USERS    General Bullet Physics Support and Feedback    Release Announcements    Applications, Games, Demos or Movies using Bullet PHYSICS AUTHORING TOOLS, SERIALIZATION AND STANDARDS    Physics authoring tools, serialization, standards and related topics RESEARCH AND DEVELOPMENT IN COLLISION DETECTION & PHYSICS. Don't post Bullet support questions here!    Research and development discussion about Collision Detection and Physics Simulation    Links, Papers, Libraries, Demos, Movies, Comparisons       Non-technical forum and license/patent discussion    Career Opportunities