partial bugfix [#24002] Constraint "Limit rotation" doesn't work properly
this fixes the obvious problems but there are still some rotation jumping when clamping in some cases.
This commit is contained in:
@@ -1381,6 +1381,7 @@ static bConstraintTypeInfo CTI_LOCLIMIT = {
|
||||
static void rotlimit_evaluate (bConstraint *con, bConstraintOb *cob, ListBase *UNUSED(targets))
|
||||
{
|
||||
bRotLimitConstraint *data = con->data;
|
||||
float eul_zero[3]= {0.0f, 0.0f, 0.0f};
|
||||
float loc[3];
|
||||
float eul[3];
|
||||
float size[3];
|
||||
@@ -1388,8 +1389,9 @@ static void rotlimit_evaluate (bConstraint *con, bConstraintOb *cob, ListBase *U
|
||||
copy_v3_v3(loc, cob->matrix[3]);
|
||||
mat4_to_size(size, cob->matrix);
|
||||
|
||||
mat4_to_eulO(eul, cob->rotOrder, cob->matrix);
|
||||
|
||||
/* use compat function because it uses the rotation without axis flipping [#24002] */
|
||||
mat4_to_compatible_eulO(eul, eul_zero, cob->rotOrder, cob->matrix);
|
||||
|
||||
/* constraint data uses radians internally */
|
||||
|
||||
/* limiting of euler values... */
|
||||
|
||||
Reference in New Issue
Block a user