Add comment expressing uncertainty

This commit is contained in:
Pyrex 2022-12-19 23:22:37 -08:00
parent a7b016c4b2
commit 675ef20115

View File

@ -1103,6 +1103,11 @@ function rope:_drag1(n1,ax1_new,ay1_new)
local ax0,ay0=n0.ax,n0.ay local ax0,ay0=n0.ax,n0.ay
for _,anchor in level:anchor_points() do for _,anchor in level:anchor_points() do
if if
-- NOTE: Do we need to look at the new path too? Something
-- just feels wrong about this check.
-- Really our goal is to figure out if moving the end of the
-- path crosses over the anchor, which feels like a point/triangle
-- collision
_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)