提交 3da01454 编写于 作者: P Palana

fix min_adjust usage in calc_torque

上级 fd5b0087
......@@ -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 */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册