=== Transform Constraining ===
Bug #3733 Constraining on a perpendicular axis was broken on (half - 1) cases. Silly oversight on my side which didn't turn out in the test case (moving camera in and out) and only appeared in front view (not side nor top) because of positive reasons. Frankly, I still think translating an object perpendicular to the viewport is a bit silly, but now, at least, people can be silly in a predictable fashion.
This commit is contained in:
@@ -173,7 +173,7 @@ static void axisProjection(TransInfo *t, float axis[3], float in[3], float out[3
|
||||
/* For when view is parallel to constraint... will cause NaNs otherwise
|
||||
So we take vertical motion in 3D space and apply it to the
|
||||
constraint axis. Nice for camera grab + MMB */
|
||||
if(1.0f - Inpf(axis, t->viewinv[2]) < 0.000001f) {
|
||||
if(1.0f - abs(Inpf(axis, t->viewinv[2])) < 0.000001f) {
|
||||
Projf(vec, in, t->viewinv[1]);
|
||||
factor = Inpf(t->viewinv[1], vec) * 2.0f;
|
||||
/* since camera distance is quite relative, use quadratic relationship. holding shift can compensate */
|
||||
|
||||
Reference in New Issue
Block a user