Push/Pull didn't do Lock Constraint correctly. Fixed.

Also added an isLockConstraint function that tells if the current constraint is a locking constraint or not.
This commit is contained in:
2005-05-29 09:21:34 +00:00
parent eeb6adffd3
commit 14a3166685
3 changed files with 25 additions and 1 deletions

View File

@@ -1988,7 +1988,14 @@ int PushPull(TransInfo *t, short mval[2])
VecSubf(vec, t->center, td->center);
if (t->con.applyRot && t->con.mode & CON_APPLY) {
t->con.applyRot(t, td, axis);
Projf(vec, vec, axis);
if (isLockConstraint(t)) {
float dvec[3];
Projf(dvec, vec, axis);
VecSubf(vec, vec, dvec);
}
else {
Projf(vec, vec, axis);
}
}
Normalise(vec);
VecMulf(vec, distance);