diff --git a/libobs/graphics/math-extra.c b/libobs/graphics/math-extra.c index a32d28d2e..aa8311cd8 100644 --- a/libobs/graphics/math-extra.c +++ b/libobs/graphics/math-extra.c @@ -111,11 +111,11 @@ void calc_torque(struct vec3 *dst, const struct vec3 *v1, vec3_mulf(&dir, &line, 1.0f/orig_dist); torque_dist = orig_dist*torque; /* use distance to determine speed */ - adjust_dist = torque_dist*t; - if (torque_dist < min_adjust) /* prevent from going too slow */ torque_dist = min_adjust; + adjust_dist = torque_dist*t; + if (adjust_dist <= (orig_dist-LARGE_EPSILON)) { vec3_mulf(dst, &dir, adjust_dist); vec3_add(dst, dst, v1); /* add torque */