Can't make spheres inside container to stop rotating/sliding

toglia

23-10-2010 15:50:46

I posted this on Bullet's official forum but I've noticed that forum is not very active, so maybe I'll have better luck here.

In my scene I have some sort of static pipe that holds some spheres, (like spheres inside a glass), Please see above.


Now, for some reason although the spheres are tight inside this container they keep rotating like there was no friction. I have tried many ways to stop this but none have worked.

I have tested several configurations of friction to all body involved, then I also tried changing the anisotropic friction, sleeping thresholds, etc. They keep sliding...

I also tried pumping the angular damping, but I didn't like to change that cause it considerably changes the game. With a value a 0.7 they still slide.

I could see that the new values visibly changed the behavior of the simulation, so I was sure that the code was working, but they kept rotating!

This must have stopped setting a higher friction, right? Any thoughts?

Thanks for your help.

Fish

23-10-2010 18:30:06

Does dropping the restitution to 0 on both the cylinder and spheres have any effect?

- Fish

toglia

23-10-2010 19:19:48

Hi Fish.

Now I have, everyone with restitution 0, same behaviour.

Restitution = 0;
Friction = 10;
AnisotropicFriction = 10,10,10
Damping = 0,0.7
SleepingThresholds = 0,100

dodgydan2001

25-10-2010 17:42:43

I dont have a way to quickly replicate what you're trying to do, but i had an issue with spheres/cylinders rolling about too much like they had no friction on a flat plane.

I set the parameters for my sphere/cylinders like so:
restitution = 0.5;
friction = 0.9;
linear dampening = 0.2;
angular dampening = 0.4;

This worked for me, they still roll a little but do come to a stop as expected.

toglia

27-10-2010 16:06:04

Tried your values, still does it.

I'll try with another shapes to see what happes. Seems pretty weird Erwin Bullet's Admin haven't seen this behaviour before.

Fish

28-10-2010 20:48:00

It almost seems like you have friction completely disabled somehow. Are you sure that the friction value that Bullet receives is greater than zero?

- Fish

toglia

08-04-2011 23:23:25

Turns out a btHingeConstraint isn't letting the spheres to "sleep". And although this hinge does not touch or force these sphere to move they're always activated while the hinge enabled.
Looks like bullets collision algorithm maintain rigid bodies activated if hinges are close to them.
Can this be prevented. Can I force to sleep objects?
Thanks