linear limits in world coordinates
-
- Posts: 52
- Joined: Mon Jul 19, 2010 3:11 am
linear limits in world coordinates
I am playing with btGeneric6DofSpringConstraint and during simulation I like to know linear constraint limits in world coordinates (first body is fixed). I was trying to achieve that by doing calculations with frameA, frameB, calculatedTransformA and calculatedTransformA but without good result. I need it to know when body reach constraint linear limit. Thanks for any help
-
- Posts: 52
- Joined: Mon Jul 19, 2010 3:11 am
Re: linear limits in world coordinates
Ok i managed to do that. Constraint limit in world coordinates is :
note tat there is no rotations, with rotations it doesn't work, perhaps some vector must be multiplied by matrix
Code: Select all
constraint->getLinearLowerLimit(lowLimit);
lowLimit=lowLimit -
constraint->getFrameOffsetB().getOrigin() +
constraint->getFrameOffsetA().getOrigin();
//low limit is now in world coordinates