Hinge constraint spins on its own

Post Reply
Dar13
Posts: 1
Joined: Mon May 21, 2012 12:52 am

Hinge constraint spins on its own

Post by Dar13 » Mon May 21, 2012 1:37 am

Hello, hopefully someone can help me out here.

So I have a basic hinge constraint in my current game project to make a door.

It's created like this:

Code: Select all

btHingeConstraint* hingeDoor;
hingeDoor = new btHingeConstraint(*level.btBody,*hinge1.btBody,btVector3(20.0f,5.0f,-5.0f),btVector3(-5.0f,0.0f,.25f),btVector3(0,1,0),btVector3(0,1,0));
_physics->getWorld()->addConstraint(hingeDoor,true);
The two rigid bodies that make up the hinge a static triangle mesh(level.btBody) and a dynamic box(hinge1.btBody). For some reason, the hinge starts spinning once it's updated by Bullet. I'm not applying any forces to it and there's nothing hitting it that would make it continually spin like that.

I've been trying to figure what's going on, and I'm totally stumped.

Tau
Posts: 25
Joined: Tue May 01, 2012 11:52 am

Re: Hinge constraint spins on its own

Post by Tau » Mon May 21, 2012 3:06 pm

Similar problem here http://bulletphysics.org/Bullet/phpBB3/ ... f=9&t=8127
If u solve it please write where was the problem.
Btw i alredy tried sliderconstraint and result was nearly the same.

Post Reply