I'm trying to get the angle of each axis of a 6DOF constraint, so I can pass to my program. The code is below:
Code: Select all
btTypedConstraint* articulacao = mundoDinamico -> getConstraint(i);
btUniversalConstraint* articulacaoUni = (btUniversalConstraint *)(btGeneric6DofConstraint *) articulacao;
float anguloX, anguloY, anguloZ;
anguloX = articulacaoUni -> getAngle(1);
anguloY = articulacaoUni -> getAngle(0);
anguloZ = articulacaoUni -> getAngle(2);
Well, the strange behavior is that the getAngle returns zero after I start the simulation. Also, the getAngle method is not documented, so I want to understand exactly what is the range of values for the parameter of this method, and why its using YXZ. This method returns the absolute value, or the difference between each integration?
Thanks for the help!