Hi, Im not sure if this is the proper way to setup a spring constraint this is what i am trying to do and it seems to have no effect
hingeCS4->setAngularUpperLimit(btVector3(0,0,0));
hingeCS4->setAngularLowerLimit(btVector3(0,0,0));
hingeCS4->setLinearUpperLimit(btVector3(0,2,0));
hingeCS4->setLinearLowerLimit(btVector3(0,-2,0));
hingeCS4->enableSpring(0, true);
hingeCS4->setStiffness(0, 38.478f); // period 1 sec for !kG body
hingeCS4->setDamping(0, 0.01f); // add some damping
hingeCS4->setEquilibriumPoint(); // set current position as equilibrium point
btGeneric6DofSpringConstraints
-
- Posts: 171
- Joined: Sun Jan 17, 2010 4:47 am
Re: btGeneric6DofSpringConstraints
Read the detailed class description of the Spring constraint here:
http://bulletphysics.com/Bullet/BulletF ... raint.html
You are enabling the wrong spring. You are enabling the X-axis linear spring but also locking it when setting the limits. When passing in the index for which spring to enable/set settings for, pass in "1" instead of "0".
http://bulletphysics.com/Bullet/BulletF ... raint.html
You are enabling the wrong spring. You are enabling the X-axis linear spring but also locking it when setting the limits. When passing in the index for which spring to enable/set settings for, pass in "1" instead of "0".
-
- Posts: 6
- Joined: Mon May 30, 2011 8:00 am
Re: btGeneric6DofSpringConstraints
Thank you for The Reply I think I understand Now