06908955c3
Recently the snap to edges has been changed to work with coordinates 2d. Thus, the lambda of the snap pointon on edge becomes different from the actual lambda in a 3d edge. The solution to correct the lambda was this: ``` if (is_persp) { const float fac = depth_a / (depth_a + depth_b); lambda *= (1.0f + (fac - 0.5f) * (1.0f - lambda)); ```` ... But the lambda was still not very accurate. Now the function uses the `dist_squared_ray_to_seg_v3` to get the coordinate of the snap point on the edge. And then tests that point. The accuracy returned to normal values. |
||
---|---|---|
.. | ||
blender | ||
blenderplayer | ||
creator | ||
gameengine | ||
CMakeLists.txt |