Add further algo notes
This commit is contained in:
parent
675ef20115
commit
6821d6cb53
@ -1108,6 +1108,14 @@ function rope:_drag1(n1,ax1_new,ay1_new)
|
|||||||
-- Really our goal is to figure out if moving the end of the
|
-- Really our goal is to figure out if moving the end of the
|
||||||
-- path crosses over the anchor, which feels like a point/triangle
|
-- path crosses over the anchor, which feels like a point/triangle
|
||||||
-- collision
|
-- collision
|
||||||
|
-- We also want to pick the anchor that the ray sweeps over first, not
|
||||||
|
-- the closest one.
|
||||||
|
-- Maybe we should
|
||||||
|
-- (1) sort by angle difference from the original line
|
||||||
|
-- (2) ignore cases where the angle is not between the two lines
|
||||||
|
-- (3) ignore cases where the created point is further from the original point
|
||||||
|
-- than the _intended_ one would be
|
||||||
|
--
|
||||||
_in_box(anchor.ax,anchor.ay,ax0,ay0,ax1_old,ay1_old) and
|
_in_box(anchor.ax,anchor.ay,ax0,ay0,ax1_old,ay1_old) and
|
||||||
_which_side(anchor.ax,anchor.ay,ax0,ay0,ax1_old,ay1_old) !=
|
_which_side(anchor.ax,anchor.ay,ax0,ay0,ax1_old,ay1_old) !=
|
||||||
_which_side(anchor.ax,anchor.ay,ax0,ay0,ax1_new,ay1_new)
|
_which_side(anchor.ax,anchor.ay,ax0,ay0,ax1_new,ay1_new)
|
||||||
|
Loading…
Reference in New Issue
Block a user