Problem with hinges parameters

Hi everybody!

I have a problem with a hinge joint: I set parameters using the setLimit() function but whatever values a put, nothing changes in the physic world.

Here my code :
[java]HingeJoint joint3 = new HingeJoint(A.getControl(RigidBodyControl.class), B.getControl(RigidBodyControl.class),
new Vector3f(A.getWidth(), 0f, 0f),
new Vector3f(-B.getWidth(),0f,0f),
joint3.setLimit(joint3.getLowerLimit(), joint3.getUpperLimit(), 0.1f, 0.5f, 1f); // seems this line doesn’t change anything!

I have 2 rigid bodies ( one is dynamic, one is kinematic) to simulate a trap door. When the trap fall the hinge is not strong enough (the trap door is bouncing).

How can I create a stronger hinge joint?

Thank you.

ps: since it’s my first post I would like to congratulate all the community for developing this awesome 3D engine!

Nobody here?

I tried to use an SixDofJoint but it has the same behaviours (some elasticity of the joint). I search other posts but it seems that nobody knows how to modify parameters of a joint…

How can I access the bullet source code to modify it myself then…?

Sorry, this is fairly specialist knowledge so you need someone like @normen (I think - sorry if I pinged the wrong person normen!) to look at it if you want an informed answer.

You cannot change the last bit of bouncyness. I’d suggest making the trap door kinematic when its closed.

Okay thank your for the advice, It would solve part of the problem.

In fact it’s not really a trap door I want to make (:p) but it’s pretty the same. I’m building a 3D interactive prototyping tool for foldable device.

I want to be able to interact with that “trap door” by dragging it with the mouse. For this I Create a hinge each time I click on the trap door: one side is linked with the trap door and the other is linked with a temporary geometry (which one is dragged).

My question here is the opposite of the original one: can I make a spring joint (like the one existing in Unity) and set the link softer so the dragging operation is smooth?

Idk off the top of my head if the Hinge has some stiffness parameter but the SixDof has.

I’ve have used a 6dofJoint and it works well but when I want to put some limit angle using this:

Vector3f angularUpperLimit = new Vector3f(0f,FastMath.PI/2,0f);
Vector3f angularLowerLimit = new Vector3f(0f, 0f,0f);

When the joint goes to the PI/2 point the physics behave really strange: the rigid body is “ejected” violently…

when I put values lower than PI/2 it works fine and smooth but values upper than PI/2 have a stange behavior…

Do you know what it is causing this behavior?