Confusion about the hinge constraint

User avatar
dotsquid
Posts: 22
Joined: Fri Jan 14, 2011 7:10 pm
Location: Ukraine

Confusion about the hinge constraint

Post by dotsquid »

Hi there.
I'm embedding Bullet Physics into my game engine and almost all things are understandable and easy to use.
However, I've noticed a weird (or not?) behaviour of the hinge constraint. I've created a simple bridge. It has n sections (boxes) connected to each other with the hinge joints. In some cases (when a lot of balls are thrown on the bridge) it twists :shock: It means that the hinge constraint allow rotation around another axis.
Does anyone have any explanation / solution? I believe that such behaviour isn't right, because we can use a point2point constraint to achieve such effect.
Thanks in advance.
hinge.jpg
You do not have the required permissions to view the files attached to this post.
User avatar
dotsquid
Posts: 22
Joined: Fri Jan 14, 2011 7:10 pm
Location: Ukraine

Re: Confusion about the hinge constraint

Post by dotsquid »

Ah, and another question.
I've tried to make the bridge more elastic and played with _softness, _biasFactor, _relaxationFactor parameters of btHingeConstraint::setLimit. But I haven't seen any changes. I've tried values from 0.01f to 10.0f. How to use them correctly?
User avatar
dotsquid
Posts: 22
Joined: Fri Jan 14, 2011 7:10 pm
Location: Ukraine

Re: Confusion about the hinge constraint

Post by dotsquid »

Anyone? :?
User avatar
dotsquid
Posts: 22
Joined: Fri Jan 14, 2011 7:10 pm
Location: Ukraine

Re: Confusion about the hinge constraint

Post by dotsquid »

What's wrong with this forum? :(
Dirk Gregorius
Posts: 861
Joined: Sun Jul 03, 2005 4:06 pm
Location: Kirkland, WA

Re: Confusion about the hinge constraint

Post by Dirk Gregorius »

The iterative solver might have some problems with such a relative complex scene. It is a tough problem to make larger articulated structures stiff. You can try higher iterations count and smaller timesteps. Both result in stiffer simulations.